1
Fork 0

Make allocator_kind a query.

This commit is contained in:
Camille GILLOT 2021-05-11 22:05:54 +02:00
parent 9543636cd6
commit 6a371d2c89
7 changed files with 10 additions and 9 deletions

View file

@ -518,7 +518,7 @@ pub fn codegen_crate<B: ExtraBackendMethods>(
});
let allocator_module = if any_dynamic_crate {
None
} else if let Some(kind) = tcx.allocator_kind() {
} else if let Some(kind) = tcx.allocator_kind(()) {
let llmod_id =
cgu_name_builder.build_cgu_name(LOCAL_CRATE, &["crate"], Some("allocator")).to_string();
let mut modules = backend.new_metadata(tcx, &llmod_id);