diff options
| author | Chris Lattner <sabre@nondot.org> | 2002-07-25 20:52:56 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2002-07-25 20:52:56 +0000 |
| commit | 91e08321816a65e30cf12cc626f52c8b6f60f2b4 (patch) | |
| tree | 97df8ee88db6b07f0056f424836b39ca7f423da6 | |
| parent | 65923eff654baea6f7aa531f7eabb6c5050456bd (diff) | |
| download | bcm5719-llvm-91e08321816a65e30cf12cc626f52c8b6f60f2b4.tar.gz bcm5719-llvm-91e08321816a65e30cf12cc626f52c8b6f60f2b4.zip | |
Add check to fix bug:
test/Regression/Assembler/2002-07-25-ParserAssertionFailure.llx
llvm-svn: 3101
| -rw-r--r-- | llvm/lib/AsmParser/llvmAsmParser.y | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/llvmAsmParser.y b/llvm/lib/AsmParser/llvmAsmParser.y index 33ae800b594..96ba4c8c54f 100644 --- a/llvm/lib/AsmParser/llvmAsmParser.y +++ b/llvm/lib/AsmParser/llvmAsmParser.y @@ -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 |

