aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-07-21 06:29:51 +0000
committerJohn McCall <rjmccall@apple.com>2010-07-21 06:29:51 +0000
commit81407d404a3fc8d24d0e2a052d85cae183033e2b (patch)
treedbf3d2308fcd5901eea114e9ce51ece05d998132 /lib/CodeGen/CGClass.cpp
parente540e637cbb9e3963c512b179779b8afcc190026 (diff)
Switch the destructor for a temporary arising from a reference binding over to
using a lazy cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108994 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGClass.cpp')
-rw-r--r--lib/CodeGen/CGClass.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/CodeGen/CGClass.cpp b/lib/CodeGen/CGClass.cpp
index 5fe471e57c..f6357ec1d9 100644
--- a/lib/CodeGen/CGClass.cpp
+++ b/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 *