authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-10-08 18:23:26-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-10-08 18:23:38-07:00
log1b372f187223c39eb32a54c96d50aff6ab08c9d6
tree7904502d9a5118ebdb9b1aef4a97cbef397e5503
parent5e7c44a3211dc8b1bb0b6d3d4764f8fd0b8c665b

fix using the wrong allocator for modules


1 files changed, 8 insertions(+), 5 deletions(-)

src/Compilation.zig+8-5
......@@ -1352,11 +1352,14 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
13521352 });
13531353 } else null;
13541354
1355 try main_mod.deps.put(gpa, "builtin", builtin_mod);
1356 try main_mod.deps.put(gpa, "root", root_mod);
1357 try main_mod.deps.put(gpa, "std", std_mod);
1358 if (compiler_rt_mod) |m|
1359 try main_mod.deps.put(gpa, "compiler_rt", m);
1355 {
1356 try main_mod.deps.ensureUnusedCapacity(arena, 4);
1357 main_mod.deps.putAssumeCapacity("builtin", builtin_mod);
1358 main_mod.deps.putAssumeCapacity("root", root_mod);
1359 main_mod.deps.putAssumeCapacity("std", std_mod);
1360 if (compiler_rt_mod) |m|
1361 main_mod.deps.putAssumeCapacity("compiler_rt", m);
1362 }
13601363
13611364 // Pre-open the directory handles for cached ZIR code so that it does not need
13621365 // to redundantly happen for each AstGen operation.