Gabor points out that reserveOperandSpace takes # of values,

not # of operands as an input.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49599 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2008-04-13 00:14:42 +00:00
parent 78c80fdbdd
commit 86941611c9

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);