aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AsmParser/llvmAsmParser.y
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AsmParser/llvmAsmParser.y')
-rw-r--r--lib/AsmParser/llvmAsmParser.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y
index 28b4ad6..96d2dae 100644
--- a/lib/AsmParser/llvmAsmParser.y
+++ b/lib/AsmParser/llvmAsmParser.y
@@ -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()) {