aboutsummaryrefslogtreecommitdiff
path: root/src/link/SpirV.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-05-24 08:22:47 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-05-27 20:56:48 -0700
commitf97c2f28fdc3061bc7e30ccfcafaccbee77993b6 (patch)
treea2c4165829d84b35df23346b1808a43e0cccec41 /src/link/SpirV.zig
parentf6873c6b00544923d5699737651f2bc4fe29fd06 (diff)
downloadzig-f97c2f28fdc3061bc7e30ccfcafaccbee77993b6.tar.gz
zig-f97c2f28fdc3061bc7e30ccfcafaccbee77993b6.zip
update the codebase for the new std.Progress API
Diffstat (limited to 'src/link/SpirV.zig')
-rw-r--r--src/link/SpirV.zig11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/link/SpirV.zig b/src/link/SpirV.zig
index 27c905cc61..0cc238f140 100644
--- a/src/link/SpirV.zig
+++ b/src/link/SpirV.zig
@@ -193,11 +193,11 @@ pub fn freeDecl(self: *SpirV, decl_index: InternPool.DeclIndex) void {
_ = decl_index;
}
-pub fn flush(self: *SpirV, arena: Allocator, prog_node: *std.Progress.Node) link.File.FlushError!void {
+pub fn flush(self: *SpirV, arena: Allocator, prog_node: std.Progress.Node) link.File.FlushError!void {
return self.flushModule(arena, prog_node);
}
-pub fn flushModule(self: *SpirV, arena: Allocator, prog_node: *std.Progress.Node) link.File.FlushError!void {
+pub fn flushModule(self: *SpirV, arena: Allocator, prog_node: std.Progress.Node) link.File.FlushError!void {
if (build_options.skip_non_native) {
@panic("Attempted to compile for architecture that was disabled by build configuration");
}
@@ -205,8 +205,7 @@ pub fn flushModule(self: *SpirV, arena: Allocator, prog_node: *std.Progress.Node
const tracy = trace(@src());
defer tracy.end();
- var sub_prog_node = prog_node.start("Flush Module", 0);
- sub_prog_node.activate();
+ const sub_prog_node = prog_node.start("Flush Module", 0);
defer sub_prog_node.end();
const spv = &self.object.spv;
@@ -253,7 +252,7 @@ pub fn flushModule(self: *SpirV, arena: Allocator, prog_node: *std.Progress.Node
const module = try spv.finalize(arena, target);
errdefer arena.free(module);
- const linked_module = self.linkModule(arena, module, &sub_prog_node) catch |err| switch (err) {
+ const linked_module = self.linkModule(arena, module, sub_prog_node) catch |err| switch (err) {
error.OutOfMemory => return error.OutOfMemory,
else => |other| {
log.err("error while linking: {s}\n", .{@errorName(other)});
@@ -264,7 +263,7 @@ pub fn flushModule(self: *SpirV, arena: Allocator, prog_node: *std.Progress.Node
try self.base.file.?.writeAll(std.mem.sliceAsBytes(linked_module));
}
-fn linkModule(self: *SpirV, a: Allocator, module: []Word, progress: *std.Progress.Node) ![]Word {
+fn linkModule(self: *SpirV, a: Allocator, module: []Word, progress: std.Progress.Node) ![]Word {
_ = self;
const lower_invocation_globals = @import("SpirV/lower_invocation_globals.zig");