Revert accidental commit.
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 17 Feb 2015 16:53:08 +0000 (16:53 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 17 Feb 2015 16:53:08 +0000 (16:53 +0000)
llvm-svn: 229510

clang/lib/CodeGen/CGCleanup.cpp

index f7971f6..566befc 100644 (file)
@@ -731,7 +731,7 @@ void CodeGenFunction::PopCleanupBlock(bool FallthroughIsBranchThrough) {
       }
 
       llvm::BasicBlock *FallthroughDest = nullptr;
-      llvm::BasicBlock::InstListType InstsToAppend;
+      SmallVector<llvm::Instruction*, 2> InstsToAppend;
 
       // If there's exactly one branch-after and no other threads,
       // we can route it without a switch.
@@ -796,7 +796,8 @@ void CodeGenFunction::PopCleanupBlock(bool FallthroughIsBranchThrough) {
 
       // Append the prepared cleanup prologue from above.
       llvm::BasicBlock *NormalExit = Builder.GetInsertBlock();
-      NormalExit->getInstList().splice(NormalExit->end(), InstsToAppend);
+      for (unsigned I = 0, E = InstsToAppend.size(); I != E; ++I)
+        NormalExit->getInstList().push_back(InstsToAppend[I]);
 
       // Optimistically hope that any fixups will continue falling through.
       for (unsigned I = FixupDepth, E = EHStack.getNumBranchFixups();