diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-02-27 11:03:08 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-27 11:03:08 -0800 |
| commit | 6f7354a04151bc0da7f661b46c5b5b3afed96112 (patch) | |
| tree | 78bc876eb5d68f9bde247add51e4e19ecc3a3b2b /src/arch | |
| parent | 27f589dea1dae6ec0033e1ad2902fb5dadfa562b (diff) | |
| parent | 97f2a8b5cb4c882e05add16a69c7a55f7fe46794 (diff) | |
| download | zig-6f7354a04151bc0da7f661b46c5b5b3afed96112.tar.gz zig-6f7354a04151bc0da7f661b46c5b5b3afed96112.zip | |
Merge pull request #19102 from ziglang/decouple-zir
JIT `zig fmt` and `zig reduce`
Diffstat (limited to 'src/arch')
| -rw-r--r-- | src/arch/wasm/CodeGen.zig | 5 |
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; } |
