aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-10-16 18:27:04 +0000
committerChris Lattner <sabre@nondot.org>2003-10-16 18:27:04 +0000
commite63540307db8fbe87836f597c7edc98bc560dc67 (patch)
tree469018b7973322670df90c9d456e8d86699b690c
parent3f71722f44875fd220306be9431e610d4b739ece (diff)
Add weak linking type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9168 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/GlobalValue.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h
index a80e1fe095..6177db5cd1 100644
--- a/include/llvm/GlobalValue.h
+++ b/include/llvm/GlobalValue.h
@@ -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; }