]> granicus.if.org Git - clang/commitdiff
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)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@229510 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGCleanup.cpp

index f7971f687c291071a468a6ac261f32e9ed2d8753..566befc915cfec71095b45d0648b01cb7fa02c49 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();