diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-10-23 15:35:54 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-23 15:35:54 -0700 |
| commit | 78f643c46d36d296d17b332b577c966fd0dd21bb (patch) | |
| tree | daa72a84c587ed47377d6db27bf9725f95d94cb2 /src/Value.zig | |
| parent | 6bf52b0505ad7317b5f0d6fa77b7c41318b9c73b (diff) | |
| parent | 7edd69d8aade6da2339cb0d9a027c52b3015bc31 (diff) | |
| download | zig-78f643c46d36d296d17b332b577c966fd0dd21bb.tar.gz zig-78f643c46d36d296d17b332b577c966fd0dd21bb.zip | |
Merge pull request #21758 from kcbanner/dll_storage_class
Add `is_dll_import` to @extern, to support `__declspec(dllimport)` with the MSVC ABI
Diffstat (limited to 'src/Value.zig')
| -rw-r--r-- | src/Value.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Value.zig b/src/Value.zig index 6c5c01e2cc..be2f7dc07f 100644 --- a/src/Value.zig +++ b/src/Value.zig @@ -1340,11 +1340,11 @@ pub fn isLazySize(val: Value, zcu: *Zcu) bool { }; } -pub fn isPtrToThreadLocal(val: Value, zcu: *Zcu) bool { +pub fn isPtrRuntimeValue(val: Value, zcu: *Zcu) bool { const ip = &zcu.intern_pool; const nav = ip.getBackingNav(val.toIntern()).unwrap() orelse return false; return switch (ip.indexToKey(ip.getNav(nav).status.resolved.val)) { - .@"extern" => |e| e.is_threadlocal, + .@"extern" => |e| e.is_threadlocal or e.is_dll_import, .variable => |v| v.is_threadlocal, else => false, }; |
