summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/CGCXX.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-03-06 09:23:02 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-03-06 09:23:02 +0000
commitd2e6cf1d1c6468396ec057119c32aa58b1ee5ac9 (patch)
tree7e0a88c3c6cb70271946aaa95a231b3da55d9f91 /lib/CodeGen/CGCXX.cpp
parentdf90325d4c0a65ee64d2dae3ed9b5b34f7418533 (diff)
downloadFreeBSD-src-d2e6cf1d1c6468396ec057119c32aa58b1ee5ac9.zip
FreeBSD-src-d2e6cf1d1c6468396ec057119c32aa58b1ee5ac9.tar.gz
Update clang to r97873.
Diffstat (limited to 'lib/CodeGen/CGCXX.cpp')
-rw-r--r--lib/CodeGen/CGCXX.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp
index 4889fc0..7752cf7 100644
--- a/lib/CodeGen/CGCXX.cpp
+++ b/lib/CodeGen/CGCXX.cpp
@@ -142,6 +142,12 @@ bool CodeGenModule::TryEmitDefinitionAsAlias(GlobalDecl AliasDecl,
return true;
}
+ llvm::GlobalValue::LinkageTypes TargetLinkage
+ = getFunctionLinkage(cast<FunctionDecl>(TargetDecl.getDecl()));
+
+ if (llvm::GlobalValue::isWeakForLinker(TargetLinkage))
+ return true;
+
// Derive the type for the alias.
const llvm::PointerType *AliasType
= getTypes().GetFunctionType(AliasDecl)->getPointerTo();
OpenPOWER on IntegriCloud