From a035d75a1750e59e43bb9122f33d8586ed1ee385 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 22 Jul 2022 21:24:19 -0700 Subject: [PATCH] Autodoc: update to new ZIR Fixes a merge conflict with 8e75ba653b03477229cf72211e8a8bfe7b071254 which removed ptr_type_simple and added overflow_arithmetic_ptr. --- src/Autodoc.zig | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Autodoc.zig b/src/Autodoc.zig index 4ac6873442..763df8a7a7 100644 --- a/src/Autodoc.zig +++ b/src/Autodoc.zig @@ -1373,12 +1373,18 @@ fn walkInstruction( // return operand; // }, - .ptr_type_simple => { - const ptr = data[inst_index].ptr_type_simple; - const elem_type_ref = try self.walkRef(file, parent_scope, ptr.elem_type, false); + .overflow_arithmetic_ptr => { + const un_node = data[inst_index].un_node; + const elem_type_ref = try self.walkRef(file, parent_scope, un_node.operand, false); const type_slot_index = self.types.items.len; try self.types.append(self.arena, .{ - .Pointer = .{ .size = ptr.size, .child = elem_type_ref.expr, .is_mutable = ptr.is_mutable, .is_volatile = ptr.is_volatile, .is_allowzero = ptr.is_allowzero }, + .Pointer = .{ + .size = .One, + .child = elem_type_ref.expr, + .is_mutable = true, + .is_volatile = false, + .is_allowzero = false, + }, }); return DocData.WalkResult{