Compare commits
3 Commits
04661e397d
...
7badbdb626
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7badbdb626 | ||
|
|
3571f97221 | ||
|
|
d71e8c5d66 |
@@ -442,9 +442,9 @@ static void replaceComment(string &dir, const char *firstChar)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void removeDvmSpfDirectives(SgFile* file, bool removeDvm, bool removeSpf, bool toComment)
|
void removeDvmSpfDirectives(SgFile* file, bool removeDvm, bool removeSpf, bool toCommentDvm)
|
||||||
{
|
{
|
||||||
if (!removeDvm && !removeSpf)
|
if (!removeDvm && !removeSpf && !toCommentDvm)
|
||||||
printInternalError(convertFileName(__FILE__).c_str(), __LINE__);
|
printInternalError(convertFileName(__FILE__).c_str(), __LINE__);
|
||||||
|
|
||||||
vector<SgStatement*> toDel;
|
vector<SgStatement*> toDel;
|
||||||
@@ -470,7 +470,7 @@ void removeDvmSpfDirectives(SgFile* file, bool removeDvm, bool removeSpf, bool t
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
const int var = st->variant();
|
const int var = st->variant();
|
||||||
if (isDVM_stat(st) && removeDvm || isSPF_stat(st) && removeSpf)
|
if (isDVM_stat(st) && (removeDvm || toCommentDvm) || isSPF_stat(st) && removeSpf)
|
||||||
if (st->fileName() == currFile)
|
if (st->fileName() == currFile)
|
||||||
toDel.push_back(st);
|
toDel.push_back(st);
|
||||||
|
|
||||||
@@ -480,7 +480,7 @@ void removeDvmSpfDirectives(SgFile* file, bool removeDvm, bool removeSpf, bool t
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (toComment && removeDvm)
|
if (toCommentDvm)
|
||||||
{
|
{
|
||||||
for (auto &elem : toDel)
|
for (auto &elem : toDel)
|
||||||
{
|
{
|
||||||
@@ -500,7 +500,7 @@ void removeDvmSpfDirectives(SgFile* file, bool removeDvm, bool removeSpf, bool t
|
|||||||
elem->deleteStmt();
|
elem->deleteStmt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else //removeSpf or removeDvm
|
||||||
{
|
{
|
||||||
for (auto &elem : toDel)
|
for (auto &elem : toDel)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ static void getModuleSymbols(SgStatement* func, set<SgSymbol*>& symbs)
|
|||||||
SgSymbol* s = func->symbol()->next();
|
SgSymbol* s = func->symbol()->next();
|
||||||
while (s)
|
while (s)
|
||||||
{
|
{
|
||||||
if (IS_BY_USE(s) && s->scope()->symbol()->identifier() == currScope)
|
if (IS_BY_USE(s) && s->scope() && s->scope()->symbol()->identifier() == currScope)
|
||||||
symbs.insert(s);
|
symbs.insert(s);
|
||||||
s = s->next();
|
s = s->next();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define VERSION_SPF "2399"
|
#define VERSION_SPF "2401"
|
||||||
|
|||||||
Reference in New Issue
Block a user