summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCleanup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGCleanup.cpp')
-rw-r--r--clang/lib/CodeGen/CGCleanup.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CGCleanup.cpp b/clang/lib/CodeGen/CGCleanup.cpp
index ed9f96df798..911734ae8e8 100644
--- a/clang/lib/CodeGen/CGCleanup.cpp
+++ b/clang/lib/CodeGen/CGCleanup.cpp
@@ -387,14 +387,9 @@ void CodeGenFunction::PopCleanupBlocks(EHScopeStack::stable_iterator Old) {
}
}
-/// Pops cleanup blocks until the given savepoint is reached, then add the
-/// cleanups from the given savepoint in the lifetime-extended cleanups stack.
+/// Move our deferred cleanups onto the EH stack.
void
-CodeGenFunction::PopCleanupBlocks(EHScopeStack::stable_iterator Old,
- size_t OldLifetimeExtendedSize) {
- PopCleanupBlocks(Old);
-
- // Move our deferred cleanups onto the EH stack.
+CodeGenFunction::MoveDeferedCleanups(size_t OldLifetimeExtendedSize) {
for (size_t I = OldLifetimeExtendedSize,
E = LifetimeExtendedCleanupStack.size(); I != E; /**/) {
// Alignment should be guaranteed by the vptrs in the individual cleanups.
@@ -414,6 +409,17 @@ CodeGenFunction::PopCleanupBlocks(EHScopeStack::stable_iterator Old,
LifetimeExtendedCleanupStack.resize(OldLifetimeExtendedSize);
}
+/// Pops cleanup blocks until the given savepoint is reached, then add the
+/// cleanups from the given savepoint in the lifetime-extended cleanups stack.
+void
+CodeGenFunction::PopCleanupBlocks(EHScopeStack::stable_iterator Old,
+ size_t OldLifetimeExtendedSize) {
+ PopCleanupBlocks(Old);
+
+ // Move our deferred cleanups onto the EH stack.
+ MoveDeferedCleanups(OldLifetimeExtendedSize);
+}
+
static llvm::BasicBlock *CreateNormalEntry(CodeGenFunction &CGF,
EHCleanupScope &Scope) {
assert(Scope.isNormalCleanup());
OpenPOWER on IntegriCloud