aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen')
-rw-r--r--src/codegen/c.zig2
-rw-r--r--src/codegen/llvm.zig2
-rw-r--r--src/codegen/spirv.zig4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig
index 4c2239b306..45191f3107 100644
--- a/src/codegen/c.zig
+++ b/src/codegen/c.zig
@@ -363,7 +363,7 @@ pub const DeclGen = struct {
fn fail(dg: *DeclGen, comptime format: []const u8, args: anytype) error{ AnalysisFail, OutOfMemory } {
@setCold(true);
- const src: LazySrcLoc = .{ .node_offset = 0 };
+ const src = LazySrcLoc.nodeOffset(0);
const src_loc = src.toSrcLoc(dg.decl);
dg.error_msg = try Module.ErrorMsg.create(dg.module.gpa, src_loc, format, args);
return error.AnalysisFail;
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index 188c2f6f11..60803eff69 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -2163,7 +2163,7 @@ pub const DeclGen = struct {
fn todo(self: *DeclGen, comptime format: []const u8, args: anytype) Error {
@setCold(true);
assert(self.err_msg == null);
- const src_loc = @as(LazySrcLoc, .{ .node_offset = 0 }).toSrcLoc(self.decl);
+ const src_loc = LazySrcLoc.nodeOffset(0).toSrcLoc(self.decl);
self.err_msg = try Module.ErrorMsg.create(self.gpa, src_loc, "TODO (LLVM): " ++ format, args);
return error.CodegenFail;
}
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);