Remove PHINode::reserveOperandSpace(). Instead, add a parameter to
PHINode::Create() giving the (known or expected) number of operands.

llvm-svn: 128537
diff --git a/llvm/lib/Transforms/Instrumentation/PathProfiling.cpp b/llvm/lib/Transforms/Instrumentation/PathProfiling.cpp
index ca2c6fb..830251c 100644
--- a/llvm/lib/Transforms/Instrumentation/PathProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/PathProfiling.cpp
@@ -931,9 +931,9 @@
   BasicBlock::iterator insertPoint = block->getFirstNonPHI();
   pred_iterator PB = pred_begin(node->getBlock()),
           PE = pred_end(node->getBlock());
-  PHINode* phi = PHINode::Create(Type::getInt32Ty(*Context), "pathNumber",
+  PHINode* phi = PHINode::Create(Type::getInt32Ty(*Context),
+                                 std::distance(PB, PE), "pathNumber",
                                  insertPoint );
-  phi->reserveOperandSpace(std::distance(PB, PE));
   node->setPathPHI(phi);
   node->setStartingPathNumber(phi);
   node->setEndingPathNumber(phi);