diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-06 09:23:02 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-06 09:23:02 +0000 |
commit | dd5132ce2569a1ef901c92772eb8581aa1705f25 (patch) | |
tree | 7e0a88c3c6cb70271946aaa95a231b3da55d9f91 /lib/CodeGen/CGCXX.cpp | |
parent | 79ade4e028932fcb9dab15e2fb2305ca15ab0f14 (diff) | |
download | src-dd5132ce2569a1ef901c92772eb8581aa1705f25.tar.gz src-dd5132ce2569a1ef901c92772eb8581aa1705f25.zip |
Notes
Diffstat (limited to 'lib/CodeGen/CGCXX.cpp')
-rw-r--r-- | lib/CodeGen/CGCXX.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp index 4889fc08f488..7752cf79a28d 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(); |