Add some more with_ignore to get tests passing
This commit is contained in:
parent
c6445ba25b
commit
2ee7493b2a
3 changed files with 26 additions and 15 deletions
|
@ -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)
|
||||
})
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue