mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-19 02:42:58 +00:00
Fix the logic in this assertion to properly validate the number
of arguments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64999 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a3ac0c105d
commit
07ab52b645
@ -356,8 +356,9 @@ GenericValue JIT::runFunction(Function *F,
|
||||
const FunctionType *FTy = F->getFunctionType();
|
||||
const Type *RetTy = FTy->getReturnType();
|
||||
|
||||
assert((FTy->getNumParams() <= ArgValues.size() || FTy->isVarArg()) &&
|
||||
"Too many arguments passed into function!");
|
||||
assert((FTy->getNumParams() == ArgValues.size() ||
|
||||
(FTy->isVarArg() && FTy->getNumParams() <= ArgValues.size())) &&
|
||||
"Wrong number of arguments passed into function!");
|
||||
assert(FTy->getNumParams() == ArgValues.size() &&
|
||||
"This doesn't support passing arguments through varargs (yet)!");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user