aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-04-18 06:28:49 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-04-18 16:41:54 -0700
commitc9858f833c2e1d5ef414af7e01d465baa88ef9cc (patch)
tree1abc39e35044723c47f1c5a566bfaa545ac9703f /src/Module.zig
parentb75d86027d589be632a831ec55565230818dc4ef (diff)
downloadzig-c9858f833c2e1d5ef414af7e01d465baa88ef9cc.tar.gz
zig-c9858f833c2e1d5ef414af7e01d465baa88ef9cc.zip
stage2: fix building stage3 in release mode
Previously, comptime function calls could cause a crash in the hash function due to a lazy value depending on an unresolved type.
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Module.zig b/src/Module.zig
index 53c72ccec2..95ae55feb8 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -205,7 +205,7 @@ pub const MemoizedCall = struct {
// The generic function Decl is guaranteed to be the first dependency
// of each of its instantiations.
- std.hash.autoHash(&hasher, @ptrToInt(key.func));
+ std.hash.autoHash(&hasher, key.func);
// This logic must be kept in sync with the logic in `analyzeCall` that
// computes the hash.