summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
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_ssa/src
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_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/meth.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/meth.rs b/compiler/rustc_codegen_ssa/src/meth.rs
index efeec5b7284..3267d3206f7 100644
--- a/compiler/rustc_codegen_ssa/src/meth.rs
+++ b/compiler/rustc_codegen_ssa/src/meth.rs
@@ -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;