1
Fork 0

Add some more with_ignore to get tests passing

This commit is contained in:
Alex Crichton 2017-09-07 07:21:49 -07:00
parent c6445ba25b
commit 2ee7493b2a
3 changed files with 26 additions and 15 deletions

View file

@ -1101,10 +1101,10 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
}
pub fn lang_items(self) -> Rc<middle::lang_items::LanguageItems> {
// 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<stability::Index<'tcx>> {
// FIXME(#42293) we should actually track this, but fails too many tests
// today.
self.dep_graph.with_ignore(|| {
self.stability_index(LOCAL_CRATE)
})

View file

@ -124,6 +124,9 @@ pub fn get_fn<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
}
}
// 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)
{
@ -131,6 +134,7 @@ pub fn get_fn<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
llvm::LLVMSetDLLStorageClass(llfn, llvm::DLLStorageClass::DllImport);
}
}
});
llfn
};

View file

@ -211,12 +211,17 @@ pub fn get_static(ccx: &CrateContext, def_id: DefId) -> ValueRef {
g
};
// 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