1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

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 83852e3451
commit 63753b7be7

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;