aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Module.zig b/src/Module.zig
index 45e0779c54..34617ed3e2 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -559,7 +559,9 @@ pub const Decl = struct {
}
if (decl.getFunction()) |func| {
_ = mod.align_stack_fns.remove(func);
- _ = mod.monomorphed_funcs.remove(func);
+ if (func.comptime_args != null) {
+ _ = mod.monomorphed_funcs.remove(func);
+ }
func.deinit(gpa);
gpa.destroy(func);
}
@@ -1478,6 +1480,7 @@ pub const Fn = struct {
/// This is important because it may be accessed when resizing monomorphed_funcs
/// while this Fn has already been added to the set, but does not have the
/// owner_decl, comptime_args, or other fields populated yet.
+ /// This field is undefined if comptime_args == null.
hash: u64,
/// Relative to owner Decl.