aboutsummaryrefslogtreecommitdiff
path: root/src/link/Elf
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2024-06-15 19:57:47 -0400
committerJacob Young <jacobly0@users.noreply.github.com>2024-07-07 22:59:52 -0400
commitca02266157ee72e41068672c8ca6f928fcbf6fdf (patch)
treed827ad6e5d0d311c4fca7fa83a32a98d3d201ac4 /src/link/Elf
parent525f341f33af9b8aad53931fd5511f00a82cb090 (diff)
downloadzig-ca02266157ee72e41068672c8ca6f928fcbf6fdf.tar.gz
zig-ca02266157ee72e41068672c8ca6f928fcbf6fdf.zip
Zcu: pass `PerThread` to intern pool string functions
Diffstat (limited to 'src/link/Elf')
-rw-r--r--src/link/Elf/ZigObject.zig16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/link/Elf/ZigObject.zig b/src/link/Elf/ZigObject.zig
index 8cfa5e701f..7a419750d4 100644
--- a/src/link/Elf/ZigObject.zig
+++ b/src/link/Elf/ZigObject.zig
@@ -908,7 +908,7 @@ fn updateDeclCode(
const gpa = elf_file.base.comp.gpa;
const mod = pt.zcu;
const decl = mod.declPtr(decl_index);
- const decl_name = try decl.fullyQualifiedName(mod);
+ const decl_name = try decl.fullyQualifiedName(pt);
log.debug("updateDeclCode {}{*}", .{ decl_name.fmt(&mod.intern_pool), decl });
@@ -1009,7 +1009,7 @@ fn updateTlv(
const mod = pt.zcu;
const gpa = mod.gpa;
const decl = mod.declPtr(decl_index);
- const decl_name = try decl.fullyQualifiedName(mod);
+ const decl_name = try decl.fullyQualifiedName(pt);
log.debug("updateTlv {} ({*})", .{ decl_name.fmt(&mod.intern_pool), decl });
@@ -1286,7 +1286,7 @@ pub fn lowerUnnamedConst(
}
const unnamed_consts = gop.value_ptr;
const decl = mod.declPtr(decl_index);
- const decl_name = try decl.fullyQualifiedName(mod);
+ const decl_name = try decl.fullyQualifiedName(pt);
const index = unnamed_consts.items.len;
const name = try std.fmt.allocPrint(gpa, "__unnamed_{}_{d}", .{ decl_name.fmt(&mod.intern_pool), index });
defer gpa.free(name);
@@ -1466,19 +1466,19 @@ pub fn updateExports(
/// Must be called only after a successful call to `updateDecl`.
pub fn updateDeclLineNumber(
self: *ZigObject,
- mod: *Module,
+ pt: Zcu.PerThread,
decl_index: InternPool.DeclIndex,
) !void {
const tracy = trace(@src());
defer tracy.end();
- const decl = mod.declPtr(decl_index);
- const decl_name = try decl.fullyQualifiedName(mod);
+ const decl = pt.zcu.declPtr(decl_index);
+ const decl_name = try decl.fullyQualifiedName(pt);
- log.debug("updateDeclLineNumber {}{*}", .{ decl_name.fmt(&mod.intern_pool), decl });
+ log.debug("updateDeclLineNumber {}{*}", .{ decl_name.fmt(&pt.zcu.intern_pool), decl });
if (self.dwarf) |*dw| {
- try dw.updateDeclLineNumber(mod, decl_index);
+ try dw.updateDeclLineNumber(pt.zcu, decl_index);
}
}