authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-12-16 15:49:08-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-01-01 17:51:20-07:00
log9b98d33d0b76a8c8b23958c89ab7e952893697be
tree7d9f8349366d92025c71cf7e328fe25cd25fa719
parentf2564318385ea90b08af044ae32ddef26e6346bd

Compilation: don't store arena until it's done being used


1 files changed, 2 insertions(+), 1 deletions(-)

src/Compilation.zig+2-1
......@@ -1443,7 +1443,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
14431443
14441444 comp.* = .{
14451445 .gpa = gpa,
1446 .arena = arena_allocator,
1446 .arena = undefined, // populated after we are finished with `arena`
14471447 .module = opt_zcu,
14481448 .cache_use = undefined, // populated below
14491449 .bin_file = null, // populated below
......@@ -1667,6 +1667,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
16671667 },
16681668 }
16691669
1670 comp.arena = arena_allocator;
16701671 break :comp comp;
16711672 };
16721673 errdefer comp.destroy();