diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-07-10 10:52:17 -0400 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2023-07-19 23:38:40 -0400 |
| commit | ff8a49448c70ffe73826c7987522ed63fddd654f (patch) | |
| tree | 36107c8b3539051f4539836d09145e231f260293 /src/Module.zig | |
| parent | 2cb52235b91f7e4bf5a4ebf77a5008adfc30c8b9 (diff) | |
| download | zig-ff8a49448c70ffe73826c7987522ed63fddd654f.tar.gz zig-ff8a49448c70ffe73826c7987522ed63fddd654f.zip | |
llvm: finish converting `lowerValue`
Diffstat (limited to 'src/Module.zig')
| -rw-r--r-- | src/Module.zig | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/Module.zig b/src/Module.zig index ea444d3cc4..41236880c5 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -835,10 +835,6 @@ pub const Decl = struct { assert(decl.has_tv); return @as(u32, @intCast(decl.alignment.toByteUnitsOptional() orelse decl.ty.abiAlignment(mod))); } - - pub fn intern(decl: *Decl, mod: *Module) Allocator.Error!void { - decl.val = (try decl.val.intern(decl.ty, mod)).toValue(); - } }; /// This state is attached to every Decl when Module emit_h is non-null. @@ -4204,7 +4200,7 @@ pub fn semaFile(mod: *Module, file: *File) SemaError!void { try wip_captures.finalize(); for (comptime_mutable_decls.items) |decl_index| { const decl = mod.declPtr(decl_index); - try decl.intern(mod); + _ = try decl.internValue(mod); } new_decl.analysis = .complete; } else |err| switch (err) { @@ -4315,7 +4311,7 @@ fn semaDecl(mod: *Module, decl_index: Decl.Index) !bool { try wip_captures.finalize(); for (comptime_mutable_decls.items) |ct_decl_index| { const ct_decl = mod.declPtr(ct_decl_index); - try ct_decl.intern(mod); + _ = try ct_decl.internValue(mod); } const align_src: LazySrcLoc = .{ .node_offset_var_decl_align = 0 }; const section_src: LazySrcLoc = .{ .node_offset_var_decl_section = 0 }; @@ -5362,7 +5358,7 @@ pub fn analyzeFnBody(mod: *Module, func_index: InternPool.Index, arena: Allocato try wip_captures.finalize(); for (comptime_mutable_decls.items) |ct_decl_index| { const ct_decl = mod.declPtr(ct_decl_index); - try ct_decl.intern(mod); + _ = try ct_decl.internValue(mod); } // Copy the block into place and mark that as the main block. @@ -6369,7 +6365,7 @@ pub fn markDeclAlive(mod: *Module, decl: *Decl) Allocator.Error!void { if (decl.alive) return; decl.alive = true; - try decl.intern(mod); + _ = try decl.internValue(mod); // This is the first time we are marking this Decl alive. We must // therefore recurse into its value and mark any Decl it references |
