mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-12 02:47:10 +00:00
Move a loop invariant outside the loop.
llvm-svn: 315404
This commit is contained in:
parent
ac27de9dc7
commit
7f1c266e43
@ -201,13 +201,12 @@ static std::string filename(InputFile *File) {
|
||||
}
|
||||
|
||||
bool LinkerScript::shouldKeep(InputSectionBase *S) {
|
||||
for (InputSectionDescription *ID : KeptSections) {
|
||||
std::string Filename = filename(S->File);
|
||||
std::string Filename = filename(S->File);
|
||||
for (InputSectionDescription *ID : KeptSections)
|
||||
if (ID->FilePat.match(Filename))
|
||||
for (SectionPattern &P : ID->SectionPatterns)
|
||||
if (P.SectionPat.match(S->Name))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user