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:
962e075
)
Check that there are not more attributes than
author
Duncan Sands
<baldrick@free.fr>
Fri, 30 Nov 2007 15:52:20 +0000
(15:52 +0000)
committer
Duncan Sands
<baldrick@free.fr>
Fri, 30 Nov 2007 15:52:20 +0000
(15:52 +0000)
function parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44452
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 eb7c90f01cc1de11082a81be179ca8502ccfc00b..c3633ff97a11635c9fa916346c13d8ed5c6dda6f 100644
(file)
--- a/
lib/VMCore/Verifier.cpp
+++ b/
lib/VMCore/Verifier.cpp
@@
-396,6
+396,10
@@
void Verifier::visitFunction(Function &F) {
bool SawSRet = false;
if (const ParamAttrsList *Attrs = F.getParamAttrs()) {
+ Assert1(Attrs->size() &&
+ Attrs->getParamIndex(Attrs->size()-1) <= FT->getNumParams(),
+ "Function has excess attributes!", &F);
+
bool SawNest = false;
for (unsigned Idx = 0; Idx <= FT->getNumParams(); ++Idx) {