aboutsummaryrefslogtreecommitdiff
path: root/src/arch/wasm/CodeGen.zig
diff options
context:
space:
mode:
authorantlilja <liljaanton2001@gmail.com>2022-07-30 11:39:49 +0200
committerantlilja <liljaanton2001@gmail.com>2022-08-01 14:51:50 +0200
commitcd8070f94f6865959949dbcec6e0e32cd88bb544 (patch)
tree5eff505123ed4ea2eaefb159943f92748a8d2607 /src/arch/wasm/CodeGen.zig
parentff125db53d8c18a63872ebdcdf6dd9653eb3f56b (diff)
downloadzig-cd8070f94f6865959949dbcec6e0e32cd88bb544.tar.gz
zig-cd8070f94f6865959949dbcec6e0e32cd88bb544.zip
Removed param_names from Fn inside Module.zig
Removed the copy of param_names inside of Fn and changed to implementation of getParamName to fetch to parameter name from the ZIR. The signature of getParamName was also changed to take an additional *Module argument.
Diffstat (limited to 'src/arch/wasm/CodeGen.zig')
-rw-r--r--src/arch/wasm/CodeGen.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig
index 91072d0b4c..dd9cfba548 100644
--- a/src/arch/wasm/CodeGen.zig
+++ b/src/arch/wasm/CodeGen.zig
@@ -1991,7 +1991,7 @@ fn airArg(self: *Self, inst: Air.Inst.Index) InnerError!WValue {
switch (self.debug_output) {
.dwarf => |dwarf| {
// TODO: Get the original arg index rather than wasm arg index
- const name = self.mod_fn.getParamName(arg_index);
+ const name = self.mod_fn.getParamName(self.bin_file.base.options.module.?, arg_index);
const leb_size = link.File.Wasm.getULEB128Size(arg.local);
const dbg_info = &dwarf.dbg_info;
try dbg_info.ensureUnusedCapacity(3 + leb_size + 5 + name.len + 1);