diff options
author | Chris Lattner <sabre@nondot.org> | 2003-10-10 16:34:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-10-10 16:34:58 +0000 |
commit | bd2531f8a607bd297fd915eea45376b0b972d96e (patch) | |
tree | 39efe695a0da46425840cd5f5bdfa4d7db744305 | |
parent | abb1b588c2eb08ab9dd306b50001805bdce89553 (diff) | |
download | external_llvm-bd2531f8a607bd297fd915eea45376b0b972d96e.zip external_llvm-bd2531f8a607bd297fd915eea45376b0b972d96e.tar.gz external_llvm-bd2531f8a607bd297fd915eea45376b0b972d96e.tar.bz2 |
Reserve space for PHI operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9007 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/AsmParser/llvmAsmParser.y | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index dcfb943..f9c076c 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!"); |