Make sure that PHI node operands are first class types

llvm-svn: 9607
This commit is contained in:
Chris Lattner 2003-10-30 01:38:18 +00:00
parent de2a4b2bb4
commit 034bfaddf0

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