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.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGCleanup.cpp b/clang/lib/CodeGen/CGCleanup.cpp
index 566befc915c..f7971f687c2 100644
--- a/clang/lib/CodeGen/CGCleanup.cpp
+++ b/clang/lib/CodeGen/CGCleanup.cpp
@@ -731,7 +731,7 @@ void CodeGenFunction::PopCleanupBlock(bool FallthroughIsBranchThrough) {
}
llvm::BasicBlock *FallthroughDest = nullptr;
- SmallVector<llvm::Instruction*, 2> InstsToAppend;
+ llvm::BasicBlock::InstListType InstsToAppend;
// If there's exactly one branch-after and no other threads,
// we can route it without a switch.
@@ -796,8 +796,7 @@ void CodeGenFunction::PopCleanupBlock(bool FallthroughIsBranchThrough) {
// Append the prepared cleanup prologue from above.
llvm::BasicBlock *NormalExit = Builder.GetInsertBlock();
- for (unsigned I = 0, E = InstsToAppend.size(); I != E; ++I)
- NormalExit->getInstList().push_back(InstsToAppend[I]);
+ NormalExit->getInstList().splice(NormalExit->end(), InstsToAppend);
// Optimistically hope that any fixups will continue falling through.
for (unsigned I = FixupDepth, E = EHStack.getNumBranchFixups();
OpenPOWER on IntegriCloud