aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/spirv.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-06-10 05:26:59 -0400
committerGitHub <noreply@github.com>2022-06-10 05:26:59 -0400
commitfcfeafe99a3ecc694a3475735c81a0d75b6da6d0 (patch)
tree55eefb8b42d39c7ead40f9a92e5c494c9b2226b1 /src/codegen/spirv.zig
parent5816d3eaec3f3bb04e70c89aa402ba9e0e5e7b2c (diff)
parent436aafd3e2ef1a8f5998b974a9791b59939f57ad (diff)
downloadzig-fcfeafe99a3ecc694a3475735c81a0d75b6da6d0.tar.gz
zig-fcfeafe99a3ecc694a3475735c81a0d75b6da6d0.zip
Merge pull request #11819 from ziglang/std.debug.Trace
introduce std.debug.Trace and use it to debug a LazySrcLoc in stage2 that is set to a bogus value
Diffstat (limited to 'src/codegen/spirv.zig')
-rw-r--r--src/codegen/spirv.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/codegen/spirv.zig b/src/codegen/spirv.zig
index 0dc39db134..9879bc7f35 100644
--- a/src/codegen/spirv.zig
+++ b/src/codegen/spirv.zig
@@ -184,7 +184,7 @@ pub const DeclGen = struct {
fn fail(self: *DeclGen, comptime format: []const u8, args: anytype) Error {
@setCold(true);
- const src: LazySrcLoc = .{ .node_offset = 0 };
+ const src = LazySrcLoc.nodeOffset(0);
const src_loc = src.toSrcLoc(self.decl);
assert(self.error_msg == null);
self.error_msg = try Module.ErrorMsg.create(self.module.gpa, src_loc, format, args);
@@ -193,7 +193,7 @@ pub const DeclGen = struct {
fn todo(self: *DeclGen, comptime format: []const u8, args: anytype) Error {
@setCold(true);
- const src: LazySrcLoc = .{ .node_offset = 0 };
+ const src = LazySrcLoc.nodeOffset(0);
const src_loc = src.toSrcLoc(self.decl);
assert(self.error_msg == null);
self.error_msg = try Module.ErrorMsg.create(self.module.gpa, src_loc, "TODO (SPIR-V): " ++ format, args);