Auto merge of #89619 - michaelwoerister:incr-vtables, r=nagisa
Turn vtable_allocation() into a query This PR removes the untracked vtable-const-allocation cache from the `tcx` and turns the `vtable_allocation()` method into a query. The change is pretty straightforward and should be backportable without too much effort. Fixes https://github.com/rust-lang/rust/issues/89598.
This commit is contained in:
commit
44995f7afb
10 changed files with 128 additions and 85 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue