mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-01 15:40:46 +00:00
Reserve space for PHI operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9007 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
abb1b588c2
commit
bd2531f8a6
@ -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!");
|
||||
|
Loading…
Reference in New Issue
Block a user