aboutsummaryrefslogtreecommitdiff
path: root/src/link.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-12-23 15:55:03 -0500
committerGitHub <noreply@github.com>2024-12-23 15:55:03 -0500
commitaf5e731729592af4a5716edd3b1e03264d66ea46 (patch)
treee0d804ee5280c48654e9789c2bade7eca6c1fbc5 /src/link.zig
parentb976e89c16b4cfd97986f0dd642f987c9ca6ec64 (diff)
parent5776d8f27022926b0538e818c7408f760bf2d144 (diff)
downloadzig-af5e731729592af4a5716edd3b1e03264d66ea46.tar.gz
zig-af5e731729592af4a5716edd3b1e03264d66ea46.zip
Merge pull request #22280 from jacobly0/stage2-pp
lldb: add more stage2 pretty printers
Diffstat (limited to 'src/link.zig')
-rw-r--r--src/link.zig9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/link.zig b/src/link.zig
index b71c94d570..f0f6e9b01d 100644
--- a/src/link.zig
+++ b/src/link.zig
@@ -1537,20 +1537,23 @@ pub fn doTask(comp: *Compilation, tid: usize, task: Task) void {
};
},
.codegen_nav => |nav_index| {
- const pt: Zcu.PerThread = .{ .zcu = comp.zcu.?, .tid = @enumFromInt(tid) };
+ const pt: Zcu.PerThread = .activate(comp.zcu.?, @enumFromInt(tid));
+ defer pt.deactivate();
pt.linkerUpdateNav(nav_index) catch |err| switch (err) {
error.OutOfMemory => diags.setAllocFailure(),
};
},
.codegen_func => |func| {
- const pt: Zcu.PerThread = .{ .zcu = comp.zcu.?, .tid = @enumFromInt(tid) };
+ const pt: Zcu.PerThread = .activate(comp.zcu.?, @enumFromInt(tid));
+ defer pt.deactivate();
// This call takes ownership of `func.air`.
pt.linkerUpdateFunc(func.func, func.air) catch |err| switch (err) {
error.OutOfMemory => diags.setAllocFailure(),
};
},
.codegen_type => |ty| {
- const pt: Zcu.PerThread = .{ .zcu = comp.zcu.?, .tid = @enumFromInt(tid) };
+ const pt: Zcu.PerThread = .activate(comp.zcu.?, @enumFromInt(tid));
+ defer pt.deactivate();
pt.linkerUpdateContainerType(ty) catch |err| switch (err) {
error.OutOfMemory => diags.setAllocFailure(),
};