diff options
author | Manman Ren <mren@apple.com> | 2013-03-16 04:47:38 +0000 |
---|---|---|
committer | Manman Ren <mren@apple.com> | 2013-03-16 04:47:38 +0000 |
commit | c089074aa57af8cb9cbef1ba351e828c46bab603 (patch) | |
tree | ed80b5b100b6872c2e1aecf938819dccd4334484 /clang/lib/CodeGen/ItaniumCXXABI.cpp | |
parent | 612f7bfa4dddf8521663d8e9a60132f1dd5d3e0b (diff) | |
download | bcm5719-llvm-c089074aa57af8cb9cbef1ba351e828c46bab603.tar.gz bcm5719-llvm-c089074aa57af8cb9cbef1ba351e828c46bab603.zip |
revert r177211 due to its potential issues
llvm-svn: 177222
Diffstat (limited to 'clang/lib/CodeGen/ItaniumCXXABI.cpp')
-rw-r--r-- | clang/lib/CodeGen/ItaniumCXXABI.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/ItaniumCXXABI.cpp b/clang/lib/CodeGen/ItaniumCXXABI.cpp index 17e83a18b97..8c7a759a43e 100644 --- a/clang/lib/CodeGen/ItaniumCXXABI.cpp +++ b/clang/lib/CodeGen/ItaniumCXXABI.cpp @@ -112,7 +112,7 @@ public: void EmitInstanceFunctionProlog(CodeGenFunction &CGF); - llvm::Value *EmitConstructorCall(CodeGenFunction &CGF, + void EmitConstructorCall(CodeGenFunction &CGF, const CXXConstructorDecl *D, CXXCtorType Type, bool ForVirtualBase, bool Delegating, @@ -177,11 +177,11 @@ public: llvm::Value *readArrayCookieImpl(CodeGenFunction &CGF, llvm::Value *allocPtr, CharUnits cookieSize); +private: /// \brief Returns true if the given instance method is one of the /// kinds that the ARM ABI says returns 'this'. - bool HasThisReturn(GlobalDecl GD) const { - const CXXMethodDecl *MD = dyn_cast_or_null<CXXMethodDecl>(GD.getDecl()); - if (!MD) return false; + static bool HasThisReturn(GlobalDecl GD) { + const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl()); return ((isa<CXXDestructorDecl>(MD) && GD.getDtorType() != Dtor_Deleting) || (isa<CXXConstructorDecl>(MD))); } @@ -834,7 +834,7 @@ void ARMCXXABI::EmitInstanceFunctionProlog(CodeGenFunction &CGF) { CGF.Builder.CreateStore(getThisValue(CGF), CGF.ReturnValue); } -llvm::Value *ItaniumCXXABI::EmitConstructorCall(CodeGenFunction &CGF, +void ItaniumCXXABI::EmitConstructorCall(CodeGenFunction &CGF, const CXXConstructorDecl *D, CXXCtorType Type, bool ForVirtualBase, bool Delegating, @@ -849,7 +849,6 @@ llvm::Value *ItaniumCXXABI::EmitConstructorCall(CodeGenFunction &CGF, // FIXME: Provide a source location here. CGF.EmitCXXMemberCall(D, SourceLocation(), Callee, ReturnValueSlot(), This, VTT, VTTTy, ArgBeg, ArgEnd); - return Callee; } RValue ItaniumCXXABI::EmitVirtualDestructorCall(CodeGenFunction &CGF, |