diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/link/Wasm.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/link/Wasm.zig b/src/link/Wasm.zig index 89c552a3fb..b26d6b3b2a 100644 --- a/src/link/Wasm.zig +++ b/src/link/Wasm.zig @@ -3005,7 +3005,6 @@ pub fn getErrorTableSymbol(wasm: *Wasm) !u32 { fn populateErrorNameTable(wasm: *Wasm) !void { const symbol_index = wasm.error_table_symbol orelse return; const atom_index = wasm.symbol_atom.get(.{ .file = null, .index = symbol_index }).?; - const atom = wasm.getAtomPtr(atom_index); // Rather than creating a symbol for each individual error name, // we create a symbol for the entire region of error names. We then calculate @@ -3030,6 +3029,8 @@ fn populateErrorNameTable(wasm: *Wasm) !void { var addend: u32 = 0; const mod = wasm.base.options.module.?; for (mod.global_error_set.keys()) |error_name_nts| { + const atom = wasm.getAtomPtr(atom_index); + const error_name = mod.intern_pool.stringToSlice(error_name_nts); const len = @as(u32, @intCast(error_name.len + 1)); // names are 0-termianted |
