diff options
author | John McCall <rjmccall@apple.com> | 2011-01-27 09:37:56 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-01-27 09:37:56 +0000 |
commit | 284c48fff6d7259389c6761d9b669ae5c6c7c36d (patch) | |
tree | 00a00c136c08f20b830367b32c403a71ff6a8a1a /clang/lib/CodeGen/CGCXXABI.cpp | |
parent | 539848dd25408e946ad9128455f482913ae4e16a (diff) | |
download | bcm5719-llvm-284c48fff6d7259389c6761d9b669ae5c6c7c36d.tar.gz bcm5719-llvm-284c48fff6d7259389c6761d9b669ae5c6c7c36d.zip |
Do a proper recursive lookup when deciding whether a class's usual
deallocation function has a two-argument form. Store the result of this
check in new[] and delete[] nodes.
Fixes rdar://problem/8913519
llvm-svn: 124373
Diffstat (limited to 'clang/lib/CodeGen/CGCXXABI.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCXXABI.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCXXABI.cpp b/clang/lib/CodeGen/CGCXXABI.cpp index 627df43a28b..7fb1ffde2d0 100644 --- a/clang/lib/CodeGen/CGCXXABI.cpp +++ b/clang/lib/CodeGen/CGCXXABI.cpp @@ -142,13 +142,14 @@ void CGCXXABI::EmitReturnFromThunk(CodeGenFunction &CGF, CGF.EmitReturnOfRValue(RV, ResultType); } -CharUnits CGCXXABI::GetArrayCookieSize(QualType ElementType) { +CharUnits CGCXXABI::GetArrayCookieSize(const CXXNewExpr *expr) { return CharUnits::Zero(); } llvm::Value *CGCXXABI::InitializeArrayCookie(CodeGenFunction &CGF, llvm::Value *NewPtr, llvm::Value *NumElements, + const CXXNewExpr *expr, QualType ElementType) { // Should never be called. ErrorUnsupportedABI(CGF, "array cookie initialization"); @@ -156,7 +157,8 @@ llvm::Value *CGCXXABI::InitializeArrayCookie(CodeGenFunction &CGF, } void CGCXXABI::ReadArrayCookie(CodeGenFunction &CGF, llvm::Value *Ptr, - QualType ElementType, llvm::Value *&NumElements, + const CXXDeleteExpr *expr, QualType ElementType, + llvm::Value *&NumElements, llvm::Value *&AllocPtr, CharUnits &CookieSize) { ErrorUnsupportedABI(CGF, "array cookie reading"); |