From c9858f833c2e1d5ef414af7e01d465baa88ef9cc Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 18 Apr 2022 06:28:49 -0700 Subject: 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. --- src/Module.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Module.zig') 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. -- cgit v1.2.3