[llvm-commits] [llvm] r45850 - /llvm/trunk/lib/VMCore/Verifier.cpp
Evan Cheng
evan.cheng at apple.com
Thu Jan 10 18:13:11 PST 2008
Author: evancheng
Date: Thu Jan 10 20:13:09 2008
New Revision: 45850
URL: http://llvm.org/viewvc/llvm-project?rev=45850&view=rev
Log:
Allow parameter attributes on varargs function parameters.
Modified:
llvm/trunk/lib/VMCore/Verifier.cpp
Modified: llvm/trunk/lib/VMCore/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=45850&r1=45849&r2=45850&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Verifier.cpp (original)
+++ llvm/trunk/lib/VMCore/Verifier.cpp Thu Jan 10 20:13:09 2008
@@ -390,10 +390,9 @@
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;
More information about the llvm-commits
mailing list