Skip to content

Commit 2ee7493

Browse files
committed
Add some more with_ignore to get tests passing
1 parent c6445ba commit 2ee7493

File tree

3 files changed

+26
-15
lines changed

3 files changed

+26
-15
lines changed

src/librustc/ty/context.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -1101,10 +1101,10 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
11011101
}
11021102

11031103
pub fn lang_items(self) -> Rc<middle::lang_items::LanguageItems> {
1104-
// Right now we insert a `with_ignore` node in the dep graph here to
1105-
// ignore the fact that `get_lang_items` below depends on the entire
1106-
// crate. For now this'll prevent false positives of recompiling too
1107-
// much when anything changes.
1104+
// FIXME(#42293) Right now we insert a `with_ignore` node in the dep
1105+
// graph here to ignore the fact that `get_lang_items` below depends on
1106+
// the entire crate. For now this'll prevent false positives of
1107+
// recompiling too much when anything changes.
11081108
//
11091109
// Once red/green incremental compilation lands we should be able to
11101110
// remove this because while the crate changes often the lint level map
@@ -1115,6 +1115,8 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
11151115
}
11161116

11171117
pub fn stability(self) -> Rc<stability::Index<'tcx>> {
1118+
// FIXME(#42293) we should actually track this, but fails too many tests
1119+
// today.
11181120
self.dep_graph.with_ignore(|| {
11191121
self.stability_index(LOCAL_CRATE)
11201122
})

src/librustc_trans/callee.rs

+10-6
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,17 @@ pub fn get_fn<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
124124
}
125125
}
126126

127-
if ccx.use_dll_storage_attrs() &&
128-
tcx.is_dllimport_foreign_item(instance_def_id)
129-
{
130-
unsafe {
131-
llvm::LLVMSetDLLStorageClass(llfn, llvm::DLLStorageClass::DllImport);
127+
// FIXME(#42293) we should actually track this, but fails too many tests
128+
// today.
129+
tcx.dep_graph.with_ignore(|| {
130+
if ccx.use_dll_storage_attrs() &&
131+
tcx.is_dllimport_foreign_item(instance_def_id)
132+
{
133+
unsafe {
134+
llvm::LLVMSetDLLStorageClass(llfn, llvm::DLLStorageClass::DllImport);
135+
}
132136
}
133-
}
137+
});
134138
llfn
135139
};
136140

src/librustc_trans/consts.rs

+10-5
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,17 @@ pub fn get_static(ccx: &CrateContext, def_id: DefId) -> ValueRef {
211211
g
212212
};
213213

214-
if ccx.use_dll_storage_attrs() && ccx.tcx().is_dllimport_foreign_item(def_id) {
215-
// For foreign (native) libs we know the exact storage type to use.
216-
unsafe {
217-
llvm::LLVMSetDLLStorageClass(g, llvm::DLLStorageClass::DllImport);
214+
215+
// FIXME(#42293) we should actually track this, but fails too many tests
216+
// today.
217+
ccx.tcx().dep_graph.with_ignore(|| {
218+
if ccx.use_dll_storage_attrs() && ccx.tcx().is_dllimport_foreign_item(def_id) {
219+
// For foreign (native) libs we know the exact storage type to use.
220+
unsafe {
221+
llvm::LLVMSetDLLStorageClass(g, llvm::DLLStorageClass::DllImport);
222+
}
218223
}
219-
}
224+
});
220225
ccx.instances().borrow_mut().insert(instance, g);
221226
ccx.statics().borrow_mut().insert(g, def_id);
222227
g

0 commit comments

Comments
 (0)