diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-10-22 14:23:09 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-10-22 14:23:09 +0000 |
| commit | 6956d58722dc5832a776d9cb2b145db6f76b78de (patch) | |
| tree | 3e4a4fe4db473f700b0c73b2a4caa4fa41a22f57 /clang/lib/CodeGen/CGExprCXX.cpp | |
| parent | 0fad0d7724339d9397ad55ec6c9580a9236dad17 (diff) | |
| download | bcm5719-llvm-6956d58722dc5832a776d9cb2b145db6f76b78de.tar.gz bcm5719-llvm-6956d58722dc5832a776d9cb2b145db6f76b78de.zip | |
Revert "This patch causes clang to reject alias attributes that point to undefined names. For example, with this patch we now reject"
This reverts commit r193161.
It broke
void foo() __attribute__((alias("bar")));
void bar() {}
void zed() __attribute__((alias("foo")));
Looks like we have to fix pr17639 first :-(
llvm-svn: 193162
Diffstat (limited to 'clang/lib/CodeGen/CGExprCXX.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGExprCXX.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp index 2311e084b72..567444253c9 100644 --- a/clang/lib/CodeGen/CGExprCXX.cpp +++ b/clang/lib/CodeGen/CGExprCXX.cpp @@ -929,8 +929,9 @@ static RValue EmitNewDeleteCall(CodeGenFunction &CGF, /// to a replaceable global allocation function. /// /// We model such elidable calls with the 'builtin' attribute. + llvm::Function *Fn = dyn_cast<llvm::Function>(CalleeAddr); if (Callee->isReplaceableGlobalAllocationFunction() && - !Callee->hasAttr<AliasAttr>()) { + Fn && Fn->hasFnAttribute(llvm::Attribute::NoBuiltin)) { // FIXME: Add addAttribute to CallSite. if (llvm::CallInst *CI = dyn_cast<llvm::CallInst>(CallOrInvoke)) CI->addAttribute(llvm::AttributeSet::FunctionIndex, |

