aboutsummaryrefslogtreecommitdiff
path: root/llvm/examples/BrainF/BrainF.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-03-30 11:28:46 +0000
committerJay Foad <jay.foad@gmail.com>2011-03-30 11:28:46 +0000
commit52131344a2cbb29f60b75417d32f886032007b1f (patch)
treec82d45a3c7045d0fe4b46727a46b1ede4a8e4e64 /llvm/examples/BrainF/BrainF.cpp
parente0938d8a87a6c8b12f68fbe784a270dd2d552331 (diff)
downloadllvm-52131344a2cbb29f60b75417d32f886032007b1f.zip
llvm-52131344a2cbb29f60b75417d32f886032007b1f.tar.gz
llvm-52131344a2cbb29f60b75417d32f886032007b1f.tar.bz2
Remove PHINode::reserveOperandSpace(). Instead, add a parameter to
PHINode::Create() giving the (known or expected) number of operands. llvm-svn: 128537
Diffstat (limited to 'llvm/examples/BrainF/BrainF.cpp')
-rw-r--r--llvm/examples/BrainF/BrainF.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/examples/BrainF/BrainF.cpp b/llvm/examples/BrainF/BrainF.cpp
index 8536915..54f3553 100644
--- a/llvm/examples/BrainF/BrainF.cpp
+++ b/llvm/examples/BrainF/BrainF.cpp
@@ -294,8 +294,7 @@ void BrainF::readloop(PHINode *phi, BasicBlock *oldbb, BasicBlock *testbb,
// Make part of PHI instruction now, wait until end of loop to finish
PHINode *phi_0 =
PHINode::Create(PointerType::getUnqual(IntegerType::getInt8Ty(C)),
- headreg, testbb);
- phi_0->reserveOperandSpace(2);
+ 2, headreg, testbb);
phi_0->addIncoming(curhead, bb_0);
curhead = phi_0;
@@ -449,8 +448,8 @@ void BrainF::readloop(PHINode *phi, BasicBlock *oldbb, BasicBlock *testbb,
//%head.%d = phi i8 *[%head.%d, %main.%d]
PHINode *phi_1 = builder->
- CreatePHI(PointerType::getUnqual(IntegerType::getInt8Ty(C)), headreg);
- phi_1->reserveOperandSpace(1);
+ CreatePHI(PointerType::getUnqual(IntegerType::getInt8Ty(C)), 1,
+ headreg);
phi_1->addIncoming(head_0, testbb);
curhead = phi_1;
}