mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Make sure that PHI node operands are first class types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9607 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
478921b11a
commit
8ea8f36a7f
@ -1756,6 +1756,8 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
|
||||
}
|
||||
| PHI_TOK PHIList {
|
||||
const Type *Ty = $2->front().first->getType();
|
||||
if (!Ty->isFirstClassType())
|
||||
ThrowException("PHI node operands must be of first class type!");
|
||||
$$ = new PHINode(Ty);
|
||||
$$->op_reserve($2->size()*2);
|
||||
while ($2->begin() != $2->end()) {
|
||||
|
Loading…
Reference in New Issue
Block a user