Allow parameter attributes on varargs function parameters.

llvm-svn: 45850
This commit is contained in:
Evan Cheng 2008-01-11 02:13:09 +00:00
parent 193daf0698
commit 4cc275c3fb
1 changed files with 3 additions and 4 deletions

View File

@ -390,10 +390,9 @@ void Verifier::VerifyParamAttrs(const FunctionType *FT,
if (!Attrs)
return;
// Note that when calling a varargs function, the following test disallows
// parameter attributes for the arguments corresponding to the varargs part.
Assert1(Attrs->size() &&
Attrs->getParamIndex(Attrs->size()-1) <= FT->getNumParams(),
Assert1(FT->isVarArg() ||
(Attrs->size() &&
Attrs->getParamIndex(Attrs->size()-1) <= FT->getNumParams()),
"Attributes after end of type!", V);
bool SawNest = false;