about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2020-01-22 12:17:21 +0100
committerMichael Woerister <michaelwoerister@posteo>2020-01-23 16:56:59 +0100
commit197cc1e43afba388a0266a08d2b946a187b766bb (patch)
tree74a4b064655c776105752655c23056ab580683e8 /src/librustc_codegen_llvm
parent2ceb92bc53a849e36341c3fd619cb49470e224e2 (diff)
Add projection query for upstream drop-glue instances.
This reduces the amount of invalidated data when new types are
add to upstream crates.
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/callee.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/librustc_codegen_llvm/callee.rs b/src/librustc_codegen_llvm/callee.rs
index 78dd6fc8ffe..04d92142266 100644
--- a/src/librustc_codegen_llvm/callee.rs
+++ b/src/librustc_codegen_llvm/callee.rs
@@ -130,12 +130,7 @@ pub fn get_fn(cx: &CodegenCx<'ll, 'tcx>, instance: Instance<'tcx>) -> &'ll Value
                     } else {
                         // This is a monomorphization of a generic function
                         // defined in an upstream crate.
-                        if cx
-                            .tcx
-                            .upstream_monomorphizations_for(instance_def_id)
-                            .map(|set| set.contains_key(instance.substs))
-                            .unwrap_or(false)
-                        {
+                        if instance.upstream_monomorphization(tcx).is_some() {
                             // This is instantiated in another crate. It cannot
                             // be `hidden`.
                         } else {