Skip to content

Commit

Permalink
Auto merge of rust-lang#89619 - michaelwoerister:incr-vtables, r=nagisa
Browse files Browse the repository at this point in the history
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 rust-lang#89598.
  • Loading branch information
bors committed Oct 8, 2021
2 parents 03c02be + 095064b commit 2228c49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vtable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub(crate) fn get_vtable<'tcx>(
ty: Ty<'tcx>,
trait_ref: Option<ty::PolyExistentialTraitRef<'tcx>>,
) -> Value {
let alloc_id = fx.tcx.vtable_allocation(ty, trait_ref);
let alloc_id = fx.tcx.vtable_allocation((ty, trait_ref));
let data_id =
data_id_for_alloc_id(&mut fx.constants_cx, &mut *fx.module, alloc_id, Mutability::Not);
let local_data_id = fx.module.declare_data_in_func(data_id, &mut fx.bcx.func);
Expand Down

0 comments on commit 2228c49

Please sign in to comment.