aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/c.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-02-26 20:35:26 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-02-26 21:35:30 -0700
commitf7143e18e368eb89763e9d813b8b7c9c96dd1bd3 (patch)
treecf1ee7be89d5f632ef865f2ff3900c48150d08e2 /src/codegen/c.zig
parent4e2570baafb587c679ee0fc5e113ddeb36522a5d (diff)
downloadzig-f7143e18e368eb89763e9d813b8b7c9c96dd1bd3.tar.gz
zig-f7143e18e368eb89763e9d813b8b7c9c96dd1bd3.zip
move Zcu.LazySrcLoc to std.zig.LazySrcLoc
Part of an effort to ship more of the compiler in source form.
Diffstat (limited to 'src/codegen/c.zig')
-rw-r--r--src/codegen/c.zig5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig
index d4747256bb..92dc904c1a 100644
--- a/src/codegen/c.zig
+++ b/src/codegen/c.zig
@@ -13,7 +13,7 @@ const TypedValue = @import("../TypedValue.zig");
const C = link.File.C;
const Decl = Module.Decl;
const trace = @import("../tracy.zig").trace;
-const LazySrcLoc = Module.LazySrcLoc;
+const LazySrcLoc = std.zig.LazySrcLoc;
const Air = @import("../Air.zig");
const Liveness = @import("../Liveness.zig");
const InternPool = @import("../InternPool.zig");
@@ -570,8 +570,7 @@ pub const DeclGen = struct {
const mod = dg.module;
const decl_index = dg.pass.decl;
const decl = mod.declPtr(decl_index);
- const src = LazySrcLoc.nodeOffset(0);
- const src_loc = src.toSrcLoc(decl, mod);
+ const src_loc = decl.srcLoc(mod);
dg.error_msg = try Module.ErrorMsg.create(dg.gpa, src_loc, format, args);
return error.AnalysisFail;
}