forked from OSchip/llvm-project
parent
959e828b51
commit
c749745bac
|
@ -731,7 +731,7 @@ void CodeGenFunction::PopCleanupBlock(bool FallthroughIsBranchThrough) {
|
||||||
}
|
}
|
||||||
|
|
||||||
llvm::BasicBlock *FallthroughDest = nullptr;
|
llvm::BasicBlock *FallthroughDest = nullptr;
|
||||||
llvm::BasicBlock::InstListType InstsToAppend;
|
SmallVector<llvm::Instruction*, 2> InstsToAppend;
|
||||||
|
|
||||||
// If there's exactly one branch-after and no other threads,
|
// If there's exactly one branch-after and no other threads,
|
||||||
// we can route it without a switch.
|
// we can route it without a switch.
|
||||||
|
@ -796,7 +796,8 @@ void CodeGenFunction::PopCleanupBlock(bool FallthroughIsBranchThrough) {
|
||||||
|
|
||||||
// Append the prepared cleanup prologue from above.
|
// Append the prepared cleanup prologue from above.
|
||||||
llvm::BasicBlock *NormalExit = Builder.GetInsertBlock();
|
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.
|
// Optimistically hope that any fixups will continue falling through.
|
||||||
for (unsigned I = FixupDepth, E = EHStack.getNumBranchFixups();
|
for (unsigned I = FixupDepth, E = EHStack.getNumBranchFixups();
|
||||||
|
|
Loading…
Reference in New Issue