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:
Chris Lattner 2003-10-30 01:38:18 +00:00
parent 478921b11a
commit 8ea8f36a7f

View File

@ -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()) {