diff options
| author | John McCall <rjmccall@apple.com> | 2010-07-21 06:29:51 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-07-21 06:29:51 +0000 |
| commit | 8680f87d99f79a4fa8b948b7c77a8802dd39f273 (patch) | |
| tree | 0773063f3360ac133a69a5cf472e865ca7f558e3 /clang/lib/CodeGen/CGClass.cpp | |
| parent | da650e091f3d2f63a5016422b2b9bc0c1ce39bfe (diff) | |
| download | bcm5719-llvm-8680f87d99f79a4fa8b948b7c77a8802dd39f273.tar.gz bcm5719-llvm-8680f87d99f79a4fa8b948b7c77a8802dd39f273.zip | |
Switch the destructor for a temporary arising from a reference binding over to
using a lazy cleanup.
llvm-svn: 108994
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGClass.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp index 5fe471e57c8..f6357ec1d97 100644 --- a/clang/lib/CodeGen/CGClass.cpp +++ b/clang/lib/CodeGen/CGClass.cpp @@ -1178,14 +1178,18 @@ namespace { }; } +void CodeGenFunction::PushDestructorCleanup(const CXXDestructorDecl *D, + llvm::Value *Addr) { + EHStack.pushLazyCleanup<CallLocalDtor>(NormalAndEHCleanup, D, Addr); +} + void CodeGenFunction::PushDestructorCleanup(QualType T, llvm::Value *Addr) { CXXRecordDecl *ClassDecl = T->getAsCXXRecordDecl(); if (!ClassDecl) return; if (ClassDecl->hasTrivialDestructor()) return; const CXXDestructorDecl *D = ClassDecl->getDestructor(); - - EHStack.pushLazyCleanup<CallLocalDtor>(NormalAndEHCleanup, D, Addr); + PushDestructorCleanup(D, Addr); } llvm::Value * |

