summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCXXABI.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-01-27 09:37:56 +0000
committerJohn McCall <rjmccall@apple.com>2011-01-27 09:37:56 +0000
commit284c48fff6d7259389c6761d9b669ae5c6c7c36d (patch)
tree00a00c136c08f20b830367b32c403a71ff6a8a1a /clang/lib/CodeGen/CGCXXABI.cpp
parent539848dd25408e946ad9128455f482913ae4e16a (diff)
downloadbcm5719-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.cpp6
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");
OpenPOWER on IntegriCloud