diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-12-23 15:55:03 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-23 15:55:03 -0500 |
| commit | af5e731729592af4a5716edd3b1e03264d66ea46 (patch) | |
| tree | e0d804ee5280c48654e9789c2bade7eca6c1fbc5 /src/link.zig | |
| parent | b976e89c16b4cfd97986f0dd642f987c9ca6ec64 (diff) | |
| parent | 5776d8f27022926b0538e818c7408f760bf2d144 (diff) | |
| download | zig-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.zig | 9 |
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(), }; |
