diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2008-01-11 02:13:09 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2008-01-11 02:13:09 +0000 |
| commit | c37ab63df71e425951ce7a8c797540a18d0a3e63 (patch) | |
| tree | f6b931384312ef57953ffe3cf31f449970b01bdd /lib/VMCore | |
| parent | 12591d70f6c98a5c9989df2afb88e8590fc77bfa (diff) | |
| download | external_llvm-c37ab63df71e425951ce7a8c797540a18d0a3e63.zip external_llvm-c37ab63df71e425951ce7a8c797540a18d0a3e63.tar.gz external_llvm-c37ab63df71e425951ce7a8c797540a18d0a3e63.tar.bz2 | |
Allow parameter attributes on varargs function parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45850 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
| -rw-r--r-- | lib/VMCore/Verifier.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 0f7852d..8b300ff 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -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; |
