summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-13 05:44:34 +0000
committerChris Lattner <sabre@nondot.org>2009-04-13 05:44:34 +0000
commit184f1be4a8029b82df942c351e0aa506b85fe305 (patch)
tree93b64e2c025016361c390a9acbd361c2f62b0d63 /llvm/lib/Linker
parent836e77d161c92ef9f101225439e25b630a087156 (diff)
downloadbcm5719-llvm-184f1be4a8029b82df942c351e0aa506b85fe305.tar.gz
bcm5719-llvm-184f1be4a8029b82df942c351e0aa506b85fe305.zip
Add a new "available_externally" linkage type. This is intended
to support C99 inline, GNU extern inline, etc. Related bugzilla's include PR3517, PR3100, & PR2933. Nothing uses this yet, but it appears to work. llvm-svn: 68940
Diffstat (limited to 'llvm/lib/Linker')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index 0ca4e10f5bf..4a15d88d8f3 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -480,9 +480,10 @@ static bool GetLinkageResult(GlobalValue *Dest, const GlobalValue *Src,
} else if (Src->isWeakForLinker()) {
// At this point we know that Dest has LinkOnce, External*, Weak, Common,
// or DLL* linkage.
- if ((Dest->hasLinkOnceLinkage() &&
- (Src->hasWeakLinkage() || Src->hasCommonLinkage())) ||
- Dest->hasExternalWeakLinkage()) {
+ if (Dest->hasExternalWeakLinkage() ||
+ Dest->hasAvailableExternallyLinkage() ||
+ (Dest->hasLinkOnceLinkage() &&
+ (Src->hasWeakLinkage() || Src->hasCommonLinkage()))) {
LinkFromSrc = true;
LT = Src->getLinkage();
} else {
OpenPOWER on IntegriCloud