From: Chris Lattner Date: Thu, 16 Oct 2003 18:27:04 +0000 (+0000) Subject: Add weak linking type X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e63540307db8fbe87836f597c7edc98bc560dc67;p=oota-llvm.git Add weak linking type git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9168 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h index a80e1fe095a..6177db5cd1c 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; }