diff options
| author | Stephen Lin <stephenwlin@gmail.com> | 2013-06-19 23:23:19 +0000 |
|---|---|---|
| committer | Stephen Lin <stephenwlin@gmail.com> | 2013-06-19 23:23:19 +0000 |
| commit | 3258abc2bad74e8bb1799d124bc4113c7234fa42 (patch) | |
| tree | 59acc3732ab5c88d76098ecbeb1d9373d3d1a4b0 /lib/CodeGen/CGExprCXX.cpp | |
| parent | 8bb86697791077f8127f991a0eeaeefcb902b10b (diff) | |
| download | clang-3258abc2bad74e8bb1799d124bc4113c7234fa42.tar.gz clang-3258abc2bad74e8bb1799d124bc4113c7234fa42.tar.bz2 clang-3258abc2bad74e8bb1799d124bc4113c7234fa42.tar.xz | |
Revert r184205 and associated patches while investigating issue with broken buildbot (possible interaction with LTO)
<rdar://problem/14209661>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184384 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprCXX.cpp')
| -rw-r--r-- | lib/CodeGen/CGExprCXX.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/lib/CodeGen/CGExprCXX.cpp b/lib/CodeGen/CGExprCXX.cpp index 438657ae22..60a70f8e07 100644 --- a/lib/CodeGen/CGExprCXX.cpp +++ b/lib/CodeGen/CGExprCXX.cpp @@ -280,15 +280,16 @@ RValue CodeGenFunction::EmitCXXMemberCallExpr(const CXXMemberCallExpr *CE, // We also don't emit a virtual call if the base expression has a record type // because then we know what the type is. bool UseVirtualCall = CanUseVirtualCall && !DevirtualizedMethod; - llvm::Value *Callee; + llvm::Value *Callee; if (const CXXDestructorDecl *Dtor = dyn_cast<CXXDestructorDecl>(MD)) { - assert(CE->arg_begin() == CE->arg_end() && - "Destructor shouldn't have explicit parameters"); - assert(ReturnValue.isNull() && "Destructor shouldn't have return value"); if (UseVirtualCall) { - CGM.getCXXABI().EmitVirtualDestructorCall(*this, Dtor, Dtor_Complete, - CE->getExprLoc(), This); + assert(CE->arg_begin() == CE->arg_end() && + "Virtual destructor shouldn't have explicit parameters"); + return CGM.getCXXABI().EmitVirtualDestructorCall(*this, Dtor, + Dtor_Complete, + CE->getExprLoc(), + ReturnValue, This); } else { if (getLangOpts().AppleKext && MD->isVirtual() && @@ -301,16 +302,12 @@ RValue CodeGenFunction::EmitCXXMemberCallExpr(const CXXMemberCallExpr *CE, cast<CXXDestructorDecl>(DevirtualizedMethod); Callee = CGM.GetAddrOfFunction(GlobalDecl(DDtor, Dtor_Complete), Ty); } - EmitCXXMemberCall(MD, CE->getExprLoc(), Callee, ReturnValue, This, - /*ImplicitParam=*/0, QualType(), 0, 0); } - return RValue::get(0); - } - - if (const CXXConstructorDecl *Ctor = dyn_cast<CXXConstructorDecl>(MD)) { + } else if (const CXXConstructorDecl *Ctor = + dyn_cast<CXXConstructorDecl>(MD)) { Callee = CGM.GetAddrOfFunction(GlobalDecl(Ctor, Ctor_Complete), Ty); } else if (UseVirtualCall) { - Callee = BuildVirtualCall(MD, This, Ty); + Callee = BuildVirtualCall(MD, This, Ty); } else { if (getLangOpts().AppleKext && MD->isVirtual() && @@ -1416,7 +1413,8 @@ static void EmitObjectDelete(CodeGenFunction &CGF, // FIXME: Provide a source location here. CXXDtorType DtorType = UseGlobalDelete ? Dtor_Complete : Dtor_Deleting; CGF.CGM.getCXXABI().EmitVirtualDestructorCall(CGF, Dtor, DtorType, - SourceLocation(), Ptr); + SourceLocation(), + ReturnValueSlot(), Ptr); if (UseGlobalDelete) { CGF.PopCleanupBlock(); |
