summaryrefslogtreecommitdiff
path: root/include/llvm/GlobalValue.h
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-03-11 08:08:06 +0000
committerDuncan Sands <baldrick@free.fr>2009-03-11 08:08:06 +0000
commit5f4ee1fc5d00ae55c30fa2ce450c69be4c6d6e63 (patch)
tree524f8864fae13a926989fb2edb5d72e0dc180dbe /include/llvm/GlobalValue.h
parent841c6a4345082e9a1252cc39bcce7f1423a76ded (diff)
downloadllvm-5f4ee1fc5d00ae55c30fa2ce450c69be4c6d6e63.tar.gz
llvm-5f4ee1fc5d00ae55c30fa2ce450c69be4c6d6e63.tar.bz2
llvm-5f4ee1fc5d00ae55c30fa2ce450c69be4c6d6e63.tar.xz
Remove the one-definition-rule version of extern_weak
linkage: this linkage type only applies to declarations, but ODR is only relevant to globals with definitions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66650 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/GlobalValue.h')
-rw-r--r--include/llvm/GlobalValue.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h
index 45528b2713..7b1bfc0494 100644
--- a/include/llvm/GlobalValue.h
+++ b/include/llvm/GlobalValue.h
@@ -40,8 +40,7 @@ public:
PrivateLinkage, ///< Like Internal, but omit from symbol table
DLLImportLinkage, ///< Function to be imported from DLL
DLLExportLinkage, ///< Function to be accessible from DLL
- ExternalWeakAnyLinkage,///< ExternalWeak linkage description
- ExternalWeakODRLinkage,///< Same, but only replaced by something equivalent.
+ ExternalWeakLinkage,///< ExternalWeak linkage description
GhostLinkage, ///< Stand-in functions for streaming fns from BC files
CommonAnyLinkage, ///< Tentative definitions
CommonODRLinkage ///< Same, but only replaced by something equivalent.
@@ -112,9 +111,6 @@ public:
static LinkageTypes getCommonLinkage(bool ODR) {
return ODR ? CommonODRLinkage : CommonAnyLinkage;
}
- static LinkageTypes getExternalWeakLinkage(bool ODR) {
- return ODR ? ExternalWeakODRLinkage : ExternalWeakAnyLinkage;
- }
bool hasExternalLinkage() const { return Linkage == ExternalLinkage; }
bool hasLinkOnceLinkage() const {
@@ -131,10 +127,7 @@ public:
}
bool hasDLLImportLinkage() const { return Linkage == DLLImportLinkage; }
bool hasDLLExportLinkage() const { return Linkage == DLLExportLinkage; }
- bool hasExternalWeakLinkage() const {
- return Linkage == ExternalWeakAnyLinkage ||
- Linkage == ExternalWeakODRLinkage;
- }
+ bool hasExternalWeakLinkage() const { return Linkage == ExternalWeakLinkage; }
bool hasGhostLinkage() const { return Linkage == GhostLinkage; }
bool hasCommonLinkage() const {
return Linkage == CommonAnyLinkage || Linkage == CommonODRLinkage;
@@ -150,7 +143,7 @@ public:
return (Linkage == WeakAnyLinkage ||
Linkage == LinkOnceAnyLinkage ||
Linkage == CommonAnyLinkage ||
- Linkage == ExternalWeakAnyLinkage);
+ Linkage == ExternalWeakLinkage);
}
/// isWeakForLinker - Whether the definition of this global may be replaced at
@@ -162,8 +155,7 @@ public:
Linkage == LinkOnceODRLinkage ||
Linkage == CommonAnyLinkage ||
Linkage == CommonODRLinkage ||
- Linkage == ExternalWeakAnyLinkage ||
- Linkage == ExternalWeakODRLinkage);
+ Linkage == ExternalWeakLinkage);
}
/// copyAttributesFrom - copy all additional attributes (those not needed to