forked from OSchip/llvm-project
Add check to fix bug:
test/Regression/Assembler/2002-07-25-ParserAssertionFailure.llx llvm-svn: 3101
This commit is contained in:
parent
65923eff65
commit
91e0832181
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue