Don't ever call materializeAllPermanently during LTO.
[oota-llvm.git] / include / llvm / IR / GlobalValue.h
index d42d0a9c39219ac7d549445e9e9b121e20655efa..aaf86c33867cfb0cae90c7885067b81afaa20e93 100644 (file)
@@ -84,6 +84,7 @@ private:
   // (19 + 3 + 2 + 1 + 2 + 5) == 32.
   unsigned SubClassData : 19;
 protected:
+  static const unsigned GlobalValueSubClassDataBits = 19;
   unsigned getGlobalValueSubClassData() const {
     return SubClassData;
   }
@@ -326,6 +327,13 @@ public:
   /// the current translation unit.
   bool isDeclaration() const;
 
+  bool isDeclarationForLinker() const {
+    if (hasAvailableExternallyLinkage())
+      return true;
+
+    return isDeclaration();
+  }
+
   /// This method unlinks 'this' from the containing module, but does not delete
   /// it.
   virtual void removeFromParent() = 0;