mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Check that there are not more attributes than
function parameters. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44452 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
962e0750a5
commit
a8b974648f
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user