Gabor points out that reserveOperandSpace takes # of values,

not # of operands as an input.

llvm-svn: 49599
This commit is contained in:
Chris Lattner
2008-04-13 00:14:42 +00:00
parent b0d3844fb8
commit a0a58b63f7

View File

@@ -1476,7 +1476,7 @@ bool BitcodeReader::ParseFunctionBody(Function *F) {
if (!Ty) return Error("Invalid PHI record");
PHINode *PN = PHINode::Create(Ty);
PN->reserveOperandSpace(Record.size()-1);
PN->reserveOperandSpace((Record.size()-1)/2);
for (unsigned i = 0, e = Record.size()-1; i != e; i += 2) {
Value *V = getFnValueByID(Record[1+i], Ty);