Undo most of r54519.
[oota-llvm.git] / include / llvm / GlobalValue.h
index bc0c0a79375327afea18eacc26644ab44ca84cca..1fd899ae7b8aac0af98441fe8038e31a5f0f7955 100644 (file)
@@ -107,9 +107,19 @@ public:
   bool hasDLLImportLinkage()  const { return Linkage == DLLImportLinkage; }
   bool hasDLLExportLinkage()  const { return Linkage == DLLExportLinkage; }
   bool hasExternalWeakLinkage() const { return Linkage == ExternalWeakLinkage; }
+  bool hasGhostLinkage()      const { return Linkage == GhostLinkage; }
   void setLinkage(LinkageTypes LT) { Linkage = LT; }
   LinkageTypes getLinkage() const { return Linkage; }
 
+  /// isWeakForLinker - Determines if symbol is weak for linker having weak or
+  /// linkonce or common or extweak LLVM linkage.
+  bool isWeakForLinker() const {
+    return (Linkage == WeakLinkage ||
+            Linkage == LinkOnceLinkage ||
+            Linkage == CommonLinkage ||
+            Linkage == ExternalWeakLinkage);
+  }
+
   /// copyAttributesFrom - copy all additional attributes (those not needed to
   /// create a GlobalValue) from the GlobalValue Src to this one.
   virtual void copyAttributesFrom(const GlobalValue *Src);