diff options
author | Jay Foad <jay.foad@gmail.com> | 2011-03-30 11:28:46 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2011-03-30 11:28:46 +0000 |
commit | 52131344a2cbb29f60b75417d32f886032007b1f (patch) | |
tree | c82d45a3c7045d0fe4b46727a46b1ede4a8e4e64 /llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp | |
parent | e0938d8a87a6c8b12f68fbe784a270dd2d552331 (diff) | |
download | bcm5719-llvm-52131344a2cbb29f60b75417d32f886032007b1f.tar.gz bcm5719-llvm-52131344a2cbb29f60b75417d32f886032007b1f.zip |
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/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp b/llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp index 24d20d0e84d..46d4adaaa15 100644 --- a/llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp +++ b/llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp @@ -116,8 +116,8 @@ bool UnifyFunctionExitNodes::runOnFunction(Function &F) { ReturnInst::Create(F.getContext(), NULL, NewRetBlock); } else { // If the function doesn't return void... add a PHI node to the block... - PN = PHINode::Create(F.getReturnType(), "UnifiedRetVal"); - PN->reserveOperandSpace(ReturningBlocks.size()); + PN = PHINode::Create(F.getReturnType(), ReturningBlocks.size(), + "UnifiedRetVal"); NewRetBlock->getInstList().push_back(PN); ReturnInst::Create(F.getContext(), PN, NewRetBlock); } |