From b57ac6f4bd6449f36cac92237f66f80488fd1e55 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 21 Oct 2001 21:54:51 +0000 Subject: [PATCH] Fix erroneous assertion failure on the following code: declare int "malloc"(...) ... %reg112 = call int (...) * %malloc( uint %cast1007 ) llvm-svn: 932 --- llvm/lib/VMCore/iCall.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/VMCore/iCall.cpp b/llvm/lib/VMCore/iCall.cpp index fc718d6887ff..3f73933690d2 100644 --- a/llvm/lib/VMCore/iCall.cpp +++ b/llvm/lib/VMCore/iCall.cpp @@ -26,7 +26,7 @@ CallInst::CallInst(Value *Meth, const vector ¶ms, const MethodType::ParamTypes &PL = MTy->getParamTypes(); assert((params.size() == PL.size()) || - (MTy->isVarArg() && params.size() >= PL.size()-1) && + (MTy->isVarArg() && params.size() >= PL.size()) && "Calling a function with bad signature"); for (unsigned i = 0; i < params.size(); i++) Operands.push_back(Use(params[i], this));