about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-09-07 07:21:49 -0700
committerAlex Crichton <alex@alexcrichton.com>2017-09-07 08:13:17 -0700
commit2ee7493b2ae90885fd324f40401f079fb12ff046 (patch)
tree15ec81a7d48a2ab567310022e33b2917a775fca1 /src
parentc6445ba25bbbb90fd76e64c0b0b25c7745ec806a (diff)
Add some more with_ignore to get tests passing
Diffstat (limited to 'src')
-rw-r--r--src/librustc/ty/context.rs10
-rw-r--r--src/librustc_trans/callee.rs16
-rw-r--r--src/librustc_trans/consts.rs15
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<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)
         })
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