about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-10-08 09:04:06 +0000
committerbors <bors@rust-lang.org>2021-10-08 09:04:06 +0000
commit44995f7afb18775913618ae50601be31b9f9dead (patch)
tree77ac1030bbb38e9c80d35297293ca06b10e166fc /compiler/rustc_codegen_cranelift
parent3013b26947e956352f95edfa39251319520cb06c (diff)
parentb7cc99142ad0cfe47e2fe9f7a82eaf5b672c0573 (diff)
downloadrust-44995f7afb18775913618ae50601be31b9f9dead.tar.gz
rust-44995f7afb18775913618ae50601be31b9f9dead.zip
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.
Diffstat (limited to 'compiler/rustc_codegen_cranelift')
-rw-r--r--compiler/rustc_codegen_cranelift/src/vtable.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/vtable.rs b/compiler/rustc_codegen_cranelift/src/vtable.rs
index f97d416b66f..36b3725ef42 100644
--- a/compiler/rustc_codegen_cranelift/src/vtable.rs
+++ b/compiler/rustc_codegen_cranelift/src/vtable.rs
@@ -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);