aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-07-20 12:55:03 -0700
committerGitHub <noreply@github.com>2023-07-20 12:55:03 -0700
commit3f15010abe5c5efaed16799fcb94c9f84117bdde (patch)
treef1892ab71f40a4473c35783ac88d86e4290dc0e5 /src/Module.zig
parent3bada8e3ce9ba72f57c6fbed100c76fd40ba0d15 (diff)
parent4d31d4d875f32ed49c56151ca053a614b3ae343c (diff)
downloadzig-3f15010abe5c5efaed16799fcb94c9f84117bdde.tar.gz
zig-3f15010abe5c5efaed16799fcb94c9f84117bdde.zip
Merge pull request #16430 from jacobly0/llvm-builder
llvm: begin the journey of independence from llvm
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig12
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