From 8ea8f36a7fc2c4e069ccd3b95581535c5bd3f09d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 30 Oct 2003 01:38:18 +0000 Subject: [PATCH] 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 --- lib/AsmParser/llvmAsmParser.y | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index 28b4ad6e71e..96d2daeec4b 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()) {