Add weak linking type
authorChris Lattner <sabre@nondot.org>
Thu, 16 Oct 2003 18:27:04 +0000 (18:27 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 16 Oct 2003 18:27:04 +0000 (18:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9168 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/GlobalValue.h

index a80e1fe095a3ad9bd8a25a64faa01e9cd69f8d94..6177db5cd1c0619582b0e5b16694bdf6eb78e685 100644 (file)
@@ -20,6 +20,7 @@ public:
   enum LinkageTypes {
     ExternalLinkage,   // Externally visible function
     LinkOnceLinkage,   // Keep one copy of named function when linking (inline)
+    WeakLinkage,       // Keep one copy of named function when linking (weak)
     AppendingLinkage,  // Special purpose, only applies to global arrays
     InternalLinkage    // Rename collisions when linking (static functions)
   };
@@ -40,6 +41,7 @@ public:
 
   bool hasExternalLinkage()  const { return Linkage == ExternalLinkage; }
   bool hasLinkOnceLinkage()  const { return Linkage == LinkOnceLinkage; }
+  bool hasWeakLinkage()      const { return Linkage == WeakLinkage; }
   bool hasAppendingLinkage() const { return Linkage == AppendingLinkage; }
   bool hasInternalLinkage()  const { return Linkage == InternalLinkage; }
   void setLinkage(LinkageTypes LT) { Linkage = LT; }