Add check to fix bug:

test/Regression/Assembler/2002-07-25-ParserAssertionFailure.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3101 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-07-25 20:52:56 +00:00
parent 8890f7b913
commit a4e251822a

View File

@ -1543,6 +1543,11 @@ InstVal : BinaryOps Types ValueRef ',' ValueRef {
// Create the call node...
if (!$5) { // Has no arguments?
// Make sure no arguments is a good thing!
if (Ty->getNumParams() != 0)
ThrowException("No arguments passed to a function that "
"expects arguments!");
$$ = new CallInst(V, vector<Value*>());
} else { // Has arguments?
// Loop through FunctionType's arguments and ensure they are specified