aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-10-27 14:52:00 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-10-27 14:52:00 -0700
commite494ce760428cde79b63e9a9016c4af06484eef3 (patch)
tree3205a2de5e327e61883c1d2dec37e027fe079842 /src/codegen
parentc1a5ff34f3f68a2a0bc32828ab483328cd436fea (diff)
downloadzig-e494ce760428cde79b63e9a9016c4af06484eef3.tar.gz
zig-e494ce760428cde79b63e9a9016c4af06484eef3.zip
stage2: fix small memory leak of test_functions when using `zig test`
The way `zig test` works is that it uses a stand-in var test_functions: []const TestFn = undefined; during semantic analysis, but then just before codegen, it swaps out the value with a constant like this: const test_functions: []const TestFn = .{foo, bar, baz, etc}; Before this commit, the `Module.Variable` associated with the stand-in value was leaked; now it is properly cleaned up before being replaced.
Diffstat (limited to 'src/codegen')
0 files changed, 0 insertions, 0 deletions