From bd2531f8a607bd297fd915eea45376b0b972d96e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 10 Oct 2003 16:34:58 +0000 Subject: [PATCH] Reserve space for PHI operands git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9007 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AsmParser/llvmAsmParser.y | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index dcfb9436573..f9c076c7ea5 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -1649,6 +1649,7 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef { | PHI PHIList { const Type *Ty = $2->front().first->getType(); $$ = new PHINode(Ty); + $$->op_reserve($2->size()*2); while ($2->begin() != $2->end()) { if ($2->front().first->getType() != Ty) ThrowException("All elements of a PHI node must be of the same type!");