aboutsummaryrefslogtreecommitdiff
path: root/src/arch/wasm/CodeGen.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2024-07-09 18:48:37 -0400
committerJacob Young <jacobly0@users.noreply.github.com>2024-07-10 11:10:49 -0400
commit667b4f9054cd0d4c8e9912bddc18049d09107678 (patch)
tree8049d0f1dab34e4bf5994bd4aeacbd1ba7aa804d /src/arch/wasm/CodeGen.zig
parent95d9292a7a09ed883e65510ec054619747315c48 (diff)
downloadzig-667b4f9054cd0d4c8e9912bddc18049d09107678.tar.gz
zig-667b4f9054cd0d4c8e9912bddc18049d09107678.zip
Zcu: cache fully qualified name on Decl
This avoids needing to mutate the intern pool from backends.
Diffstat (limited to 'src/arch/wasm/CodeGen.zig')
-rw-r--r--src/arch/wasm/CodeGen.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig
index 8873c5cb1b..3b81ee9c19 100644
--- a/src/arch/wasm/CodeGen.zig
+++ b/src/arch/wasm/CodeGen.zig
@@ -7284,8 +7284,8 @@ fn getTagNameFunction(func: *CodeGen, enum_ty: Type) InnerError!u32 {
defer arena_allocator.deinit();
const arena = arena_allocator.allocator();
- const fqn = try mod.declPtr(enum_decl_index).fullyQualifiedName(pt);
- const func_name = try std.fmt.allocPrintZ(arena, "__zig_tag_name_{}", .{fqn.fmt(ip)});
+ const decl = mod.declPtr(enum_decl_index);
+ const func_name = try std.fmt.allocPrintZ(arena, "__zig_tag_name_{}", .{decl.fqn.fmt(ip)});
// check if we already generated code for this.
if (func.bin_file.findGlobalSymbol(func_name)) |loc| {