aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
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 *