[llvm-commits] CVS: llvm/include/llvm/GlobalValue.h

Chris Lattner lattner at cs.uiuc.edu
Thu Oct 16 13:28:13 PDT 2003


Changes in directory llvm/include/llvm:

GlobalValue.h updated: 1.10 -> 1.11

---
Log message:

Add weak linking type


---
Diffs of the changes:  (+2 -0)

Index: llvm/include/llvm/GlobalValue.h
diff -u llvm/include/llvm/GlobalValue.h:1.10 llvm/include/llvm/GlobalValue.h:1.11
--- llvm/include/llvm/GlobalValue.h:1.10	Tue Sep 30 13:37:37 2003
+++ llvm/include/llvm/GlobalValue.h	Thu Oct 16 13:27:04 2003
@@ -20,6 +20,7 @@
   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 @@
 
   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; }





More information about the llvm-commits mailing list