projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac27de9
)
Move a loop invariant outside the loop.
author
Rui Ueyama
<ruiu@google.com>
Wed, 11 Oct 2017 01:26:22 +0000
(
01:26
+0000)
committer
Rui Ueyama
<ruiu@google.com>
Wed, 11 Oct 2017 01:26:22 +0000
(
01:26
+0000)
llvm-svn: 315404
lld/ELF/LinkerScript.cpp
patch
|
blob
|
history
diff --git
a/lld/ELF/LinkerScript.cpp
b/lld/ELF/LinkerScript.cpp
index ae413b5c5c269c4729fac9de67e49213199672ae..1831c1603cb99b476b47c695558105374cb73c62 100644
(file)
--- a/
lld/ELF/LinkerScript.cpp
+++ b/
lld/ELF/LinkerScript.cpp
@@
-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;
}