diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-08-02 18:05:30 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-08-02 18:05:30 +0000 |
commit | b23533db139e0398a8db884c6e2c1f7d4bf7c720 (patch) | |
tree | 3ac72755a7dc8811c741c95844320cd03a96d862 /clang/lib/CodeGen/CGExprCXX.cpp | |
parent | be10f9853c638c609137c1f5a3256acb742b2eae (diff) | |
download | bcm5719-llvm-b23533db139e0398a8db884c6e2c1f7d4bf7c720.tar.gz bcm5719-llvm-b23533db139e0398a8db884c6e2c1f7d4bf7c720.zip |
PR10566: Make sure codegen for deleting an pointer to an incomplete type actually works.
llvm-svn: 136703
Diffstat (limited to 'clang/lib/CodeGen/CGExprCXX.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprCXX.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp index 7967c822b36..738aac2595e 100644 --- a/clang/lib/CodeGen/CGExprCXX.cpp +++ b/clang/lib/CodeGen/CGExprCXX.cpp @@ -1206,7 +1206,7 @@ static void EmitObjectDelete(CodeGenFunction &CGF, const CXXDestructorDecl *Dtor = 0; if (const RecordType *RT = ElementType->getAs<RecordType>()) { CXXRecordDecl *RD = cast<CXXRecordDecl>(RT->getDecl()); - if (!RD->hasTrivialDestructor()) { + if (RD->hasDefinition() && !RD->hasTrivialDestructor()) { Dtor = RD->getDestructor(); if (Dtor->isVirtual()) { |