From 2ee7493b2ae90885fd324f40401f079fb12ff046 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 7 Sep 2017 07:21:49 -0700 Subject: [PATCH] Add some more with_ignore to get tests passing --- src/librustc/ty/context.rs | 10 ++++++---- src/librustc_trans/callee.rs | 16 ++++++++++------ src/librustc_trans/consts.rs | 15 ++++++++++----- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs index 10918d702d7..15e649e7cec 100644 --- a/src/librustc/ty/context.rs +++ b/src/librustc/ty/context.rs @@ -1101,10 +1101,10 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { } pub fn lang_items(self) -> Rc { - // Right now we insert a `with_ignore` node in the dep graph here to - // ignore the fact that `get_lang_items` below depends on the entire - // crate. For now this'll prevent false positives of recompiling too - // much when anything changes. + // FIXME(#42293) Right now we insert a `with_ignore` node in the dep + // graph here to ignore the fact that `get_lang_items` below depends on + // the entire crate. For now this'll prevent false positives of + // recompiling too much when anything changes. // // Once red/green incremental compilation lands we should be able to // remove this because while the crate changes often the lint level map @@ -1115,6 +1115,8 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { } pub fn stability(self) -> Rc> { + // FIXME(#42293) we should actually track this, but fails too many tests + // today. self.dep_graph.with_ignore(|| { self.stability_index(LOCAL_CRATE) }) diff --git a/src/librustc_trans/callee.rs b/src/librustc_trans/callee.rs index 71d476c31ac..246eb49ffa6 100644 --- a/src/librustc_trans/callee.rs +++ b/src/librustc_trans/callee.rs @@ -124,13 +124,17 @@ pub fn get_fn<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, } } - if ccx.use_dll_storage_attrs() && - tcx.is_dllimport_foreign_item(instance_def_id) - { - unsafe { - llvm::LLVMSetDLLStorageClass(llfn, llvm::DLLStorageClass::DllImport); + // FIXME(#42293) we should actually track this, but fails too many tests + // today. + tcx.dep_graph.with_ignore(|| { + if ccx.use_dll_storage_attrs() && + tcx.is_dllimport_foreign_item(instance_def_id) + { + unsafe { + llvm::LLVMSetDLLStorageClass(llfn, llvm::DLLStorageClass::DllImport); + } } - } + }); llfn }; diff --git a/src/librustc_trans/consts.rs b/src/librustc_trans/consts.rs index 282e960aab3..a30a15f75b3 100644 --- a/src/librustc_trans/consts.rs +++ b/src/librustc_trans/consts.rs @@ -211,12 +211,17 @@ pub fn get_static(ccx: &CrateContext, def_id: DefId) -> ValueRef { g }; - if ccx.use_dll_storage_attrs() && ccx.tcx().is_dllimport_foreign_item(def_id) { - // For foreign (native) libs we know the exact storage type to use. - unsafe { - llvm::LLVMSetDLLStorageClass(g, llvm::DLLStorageClass::DllImport); + + // FIXME(#42293) we should actually track this, but fails too many tests + // today. + ccx.tcx().dep_graph.with_ignore(|| { + if ccx.use_dll_storage_attrs() && ccx.tcx().is_dllimport_foreign_item(def_id) { + // For foreign (native) libs we know the exact storage type to use. + unsafe { + llvm::LLVMSetDLLStorageClass(g, llvm::DLLStorageClass::DllImport); + } } - } + }); ccx.instances().borrow_mut().insert(instance, g); ccx.statics().borrow_mut().insert(g, def_id); g