Remove PHINode::reserveOperandSpace(). Instead, add a parameter to
[oota-llvm.git] / lib / Transforms / Scalar / ScalarReplAggregates.cpp
index 4fdaa1ef922c2d2cd1ff48f9e8aaf8bb00c03fd8..42246ff3216249572518494db3091b439d072170 100644 (file)
@@ -1227,8 +1227,8 @@ static bool tryToMakeAllocaBePromotable(AllocaInst *AI, const TargetData *TD) {
     }
     
     const Type *LoadTy = cast<PointerType>(PN->getType())->getElementType();
-    PHINode *NewPN = PHINode::Create(LoadTy, PN->getName()+".ld", PN);
-    NewPN->reserveOperandSpace(PN->getNumIncomingValues());
+    PHINode *NewPN = PHINode::Create(LoadTy, PN->getNumIncomingValues(),
+                                     PN->getName()+".ld", PN);
 
     // Get the TBAA tag and alignment to use from one of the loads.  It doesn't
     // matter which one we get and if any differ, it doesn't matter.