1
Fork 0

Turn tcx.vtable_allocation() into a query.

This commit is contained in:
Michael Woerister 2021-10-07 11:29:01 +02:00 committed by Michael Woerister
parent a1e2c0f0ad
commit b7cc99142a
9 changed files with 101 additions and 72 deletions

View file

@ -72,7 +72,7 @@ pub fn get_vtable<'tcx, Cx: CodegenMethods<'tcx>>(
return val;
}
let vtable_alloc_id = tcx.vtable_allocation(ty, trait_ref);
let vtable_alloc_id = tcx.vtable_allocation((ty, trait_ref));
let vtable_allocation = tcx.global_alloc(vtable_alloc_id).unwrap_memory();
let vtable_const = cx.const_data_from_alloc(vtable_allocation);
let align = cx.data_layout().pointer_align.abi;