projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12591d7
)
Allow parameter attributes on varargs function parameters.
author
Evan Cheng
<evan.cheng@apple.com>
Fri, 11 Jan 2008 02:13:09 +0000
(
02:13
+0000)
committer
Evan Cheng
<evan.cheng@apple.com>
Fri, 11 Jan 2008 02:13:09 +0000
(
02:13
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45850
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Verifier.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Verifier.cpp
b/lib/VMCore/Verifier.cpp
index 0f7852d411e923e9fabfb0eefa812a2f66a8e4c5..8b300ff07f91f26b046077375aca109bd2ca060d 100644
(file)
--- 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;