aboutsummaryrefslogtreecommitdiff
path: root/src/arch
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/arch
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/arch')
-rw-r--r--src/arch/wasm/CodeGen.zig5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig
index c3a9bb8895..3a2a9c2d06 100644
--- a/src/arch/wasm/CodeGen.zig
+++ b/src/arch/wasm/CodeGen.zig
@@ -16,7 +16,7 @@ const Decl = Module.Decl;
const Type = @import("../../type.zig").Type;
const Value = @import("../../Value.zig");
const Compilation = @import("../../Compilation.zig");
-const LazySrcLoc = Module.LazySrcLoc;
+const LazySrcLoc = std.zig.LazySrcLoc;
const link = @import("../../link.zig");
const TypedValue = @import("../../TypedValue.zig");
const Air = @import("../../Air.zig");
@@ -767,8 +767,7 @@ pub fn deinit(func: *CodeGen) void {
/// Sets `err_msg` on `CodeGen` and returns `error.CodegenFail` which is caught in link/Wasm.zig
fn fail(func: *CodeGen, comptime fmt: []const u8, args: anytype) InnerError {
const mod = func.bin_file.base.comp.module.?;
- const src = LazySrcLoc.nodeOffset(0);
- const src_loc = src.toSrcLoc(func.decl, mod);
+ const src_loc = func.decl.srcLoc(mod);
func.err_msg = try Module.ErrorMsg.create(func.gpa, src_loc, fmt, args);
return error.CodegenFail;
}