fixed getInterfaceBlock

This commit is contained in:
ALEXks
2025-04-30 16:52:37 +03:00
committed by Egor Mayorov
parent 794e2daded
commit 01b376a2bf
4 changed files with 10 additions and 8 deletions

View File

@@ -834,19 +834,21 @@ static string getInterfaceBlock(SgStatement* func, const FuncParam& pars)
auto copy = duplicateProcedure(func, NULL, false, false, false, true);
const set<string> idents(pars.identificators.begin(), pars.identificators.end());
bool need = (func->symbol()->identifier() == string("bl182"));
//remove all exec
SgStatement* st = copy->lexNext();
SgStatement* last = copy->lastNodeOfStmt();
vector<SgStatement*> toExtract;
while (st != last)
{
if (isDVM_stat(st) || isSPF_stat(st))
{
if (st->variant() != ACC_ROUTINE_DIR)
{
SgStatement* next = st->lexNext();
st->extractStmt();
st = next;
toExtract.push_back(st);
st = st->lexNext();
}
else
st = st->lexNext();
@@ -868,6 +870,7 @@ static string getInterfaceBlock(SgStatement* func, const FuncParam& pars)
while (st != last)
{
const int var = st->variant();
if (var == VAR_DECL
|| var == VAR_DECL_90
|| var == DIM_STAT
@@ -877,9 +880,8 @@ static string getInterfaceBlock(SgStatement* func, const FuncParam& pars)
bool empty = filterFromList(st, idents);
if (empty)
{
SgStatement* next = st->lexNext();
toExtract.push_back(st);
st = next;
st = st->lexNext();
continue;
}
}

View File

@@ -1,3 +1,3 @@
#pragma once
#define VERSION_SPF "2413"
#define VERSION_SPF "2414"