aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/c.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-02-27 11:03:08 -0800
committerGitHub <noreply@github.com>2024-02-27 11:03:08 -0800
commit6f7354a04151bc0da7f661b46c5b5b3afed96112 (patch)
tree78bc876eb5d68f9bde247add51e4e19ecc3a3b2b /src/codegen/c.zig
parent27f589dea1dae6ec0033e1ad2902fb5dadfa562b (diff)
parent97f2a8b5cb4c882e05add16a69c7a55f7fe46794 (diff)
downloadzig-6f7354a04151bc0da7f661b46c5b5b3afed96112.tar.gz
zig-6f7354a04151bc0da7f661b46c5b5b3afed96112.zip
Merge pull request #19102 from ziglang/decouple-zir
JIT `zig fmt` and `zig reduce`
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;
}