diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-12-14 18:47:58 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-01-01 17:51:19 -0700 |
| commit | c49957dbe82d7f0db555160b50306335bfa03165 (patch) | |
| tree | 529e84e430b27c3e6f13cb7a2c956b0ee445339c /src/arch/wasm/CodeGen.zig | |
| parent | f54471b54c471bb6f8e51a1383be09d01c24d0c3 (diff) | |
| download | zig-c49957dbe82d7f0db555160b50306335bfa03165.tar.gz zig-c49957dbe82d7f0db555160b50306335bfa03165.zip | |
fix a round of compile errors caused by this branch
Diffstat (limited to 'src/arch/wasm/CodeGen.zig')
| -rw-r--r-- | src/arch/wasm/CodeGen.zig | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig index 2319330333..da33ae521d 100644 --- a/src/arch/wasm/CodeGen.zig +++ b/src/arch/wasm/CodeGen.zig @@ -1210,13 +1210,15 @@ pub fn generate( debug_output: codegen.DebugInfoOutput, ) codegen.CodeGenError!codegen.Result { _ = src_loc; - const mod = bin_file.comp.module.?; + const comp = bin_file.comp; + const gpa = comp.gpa; + const mod = comp.module.?; const func = mod.funcInfo(func_index); const decl = mod.declPtr(func.owner_decl); const namespace = mod.namespacePtr(decl.src_namespace); - const target = namespace.file_scope.mod.target; + const target = namespace.file_scope.mod.resolved_target.result; var code_gen: CodeGen = .{ - .gpa = bin_file.allocator, + .gpa = gpa, .air = air, .liveness = liveness, .code = code, @@ -7731,7 +7733,7 @@ fn airFence(func: *CodeGen, inst: Air.Inst.Index) InnerError!void { // Only when the atomic feature is enabled, and we're not building // for a single-threaded build, can we emit the `fence` instruction. // In all other cases, we emit no instructions for a fence. - const func_namespace = zcu.namespacePtr(zcu.declPtr(func.decl).namespace); + const func_namespace = zcu.namespacePtr(func.decl.src_namespace); const single_threaded = func_namespace.file_scope.mod.single_threaded; if (func.useAtomicFeature() and !single_threaded) { try func.addAtomicTag(.atomic_fence); |
