forked from OSchip/llvm-project
Adjust to the new BasicBlock ctor, which requires a function parameter
llvm-svn: 11114
This commit is contained in:
parent
bb5f0db8d6
commit
8d414ad035
|
@ -151,7 +151,7 @@ BasicBlock *LoopSimplify::SplitBlockPredecessors(BasicBlock *BB,
|
|||
const std::vector<BasicBlock*> &Preds) {
|
||||
|
||||
// Create new basic block, insert right before the original block...
|
||||
BasicBlock *NewBB = new BasicBlock(BB->getName()+Suffix, BB);
|
||||
BasicBlock *NewBB = new BasicBlock(BB->getName()+Suffix, BB->getParent(), BB);
|
||||
|
||||
// The preheader first gets an unconditional branch to the loop header...
|
||||
BranchInst *BI = new BranchInst(BB, NewBB);
|
||||
|
|
|
@ -290,7 +290,7 @@ bool TailCallElim::ProcessReturningBlock(ReturnInst *Ret, BasicBlock *&OldEntry,
|
|||
if (OldEntry == 0) {
|
||||
OldEntry = &F->getEntryBlock();
|
||||
std::string OldName = OldEntry->getName(); OldEntry->setName("tailrecurse");
|
||||
BasicBlock *NewEntry = new BasicBlock(OldName, OldEntry);
|
||||
BasicBlock *NewEntry = new BasicBlock(OldName, F, OldEntry);
|
||||
new BranchInst(OldEntry, NewEntry);
|
||||
|
||||
// Now that we have created a new block, which jumps to the entry
|
||||
|
|
Loading…
Reference in New Issue