aboutsummaryrefslogtreecommitdiff
path: root/src/Zcu/PerThread.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-08-18 13:25:13 -0700
committerGitHub <noreply@github.com>2025-08-18 13:25:13 -0700
commit001ec07772f35ffee031429a558506b89d02cdca (patch)
tree2c626a0670ba522cc201e5af8d922e2c395b8ed5 /src/Zcu/PerThread.zig
parentc1483eb05c221b4f0c0c357bf75b828f722fa44d (diff)
parent52178d14b080d0bbf5e1fe8ed25ce1c26ea18566 (diff)
downloadzig-001ec07772f35ffee031429a558506b89d02cdca.tar.gz
zig-001ec07772f35ffee031429a558506b89d02cdca.zip
Merge pull request #24249 from antlilja/dwarf-extern-arg
Fix compiler crash when passing a comptime extern function arg to a function
Diffstat (limited to 'src/Zcu/PerThread.zig')
-rw-r--r--src/Zcu/PerThread.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Zcu/PerThread.zig b/src/Zcu/PerThread.zig
index 6d2da7afa4..3c2bb27dab 100644
--- a/src/Zcu/PerThread.zig
+++ b/src/Zcu/PerThread.zig
@@ -1249,6 +1249,7 @@ fn analyzeNavVal(pt: Zcu.PerThread, nav_id: InternPool.Nav.Index) Zcu.CompileErr
.@"addrspace" = modifiers.@"addrspace",
.zir_index = old_nav.analysis.?.zir_index, // `declaration` instruction
.owner_nav = undefined, // ignored by `getExtern`
+ .source = .syntax,
}));
},
};
@@ -3435,6 +3436,7 @@ pub fn getCoerced(pt: Zcu.PerThread, val: Value, new_ty: Type) Allocator.Error!V
.@"addrspace" = e.@"addrspace",
.zir_index = e.zir_index,
.owner_nav = undefined, // ignored by `getExtern`.
+ .source = e.source,
});
return Value.fromInterned(coerced);
},