diff options
author | Chris Lattner <sabre@nondot.org> | 2002-09-10 22:38:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-09-10 22:38:49 +0000 |
commit | f2d2d0bb13ce63568362f3aaea68ce55ee040954 (patch) | |
tree | ee546725932872478ccecf423528e4efb883a653 /lib/Transforms/IPO/InlineSimple.cpp | |
parent | 1d608abbc07bbc7c78c20da6b305ef14c6c30e8e (diff) |
Clean up code due to auto-insert constructors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3666 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/InlineSimple.cpp')
-rw-r--r-- | lib/Transforms/IPO/InlineSimple.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Transforms/IPO/InlineSimple.cpp b/lib/Transforms/IPO/InlineSimple.cpp index 924ad5c93a..54092ae91b 100644 --- a/lib/Transforms/IPO/InlineSimple.cpp +++ b/lib/Transforms/IPO/InlineSimple.cpp @@ -93,12 +93,11 @@ bool InlineFunction(CallInst *CI) { // PHINode *PHI = 0; if (CalledFunc->getReturnType() != Type::VoidTy) { - PHI = new PHINode(CalledFunc->getReturnType(), CI->getName()); - // The PHI node should go at the front of the new basic block to merge all // possible incoming values. // - NewBB->getInstList().push_front(PHI); + PHI = new PHINode(CalledFunc->getReturnType(), CI->getName(), + NewBB->begin()); // Anything that used the result of the function call should now use the PHI // node as their operand. @@ -164,7 +163,7 @@ bool InlineFunction(CallInst *CI) { } // Add a branch to the code that was after the original Call. - IBB->getInstList().push_back(new BranchInst(NewBB)); + new BranchInst(NewBB, IBB->end()); break; } case Instruction::Br: |