summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2015-12-10 19:19:04 +0000
committerRui Ueyama <ruiu@google.com>2015-12-10 19:19:04 +0000
commit01faef0ddccff6213f2391fe2deb7dbb616ff67e (patch)
tree94a54ca4ab95bbfa3e238f485f8b670dc1d9576a
parent80c9b9468fafec8bdd5e389fc8b3482ace6bbff3 (diff)
downloadbcm5719-llvm-01faef0ddccff6213f2391fe2deb7dbb616ff67e.tar.gz
bcm5719-llvm-01faef0ddccff6213f2391fe2deb7dbb616ff67e.zip
Simplify. NFC.
llvm-svn: 255284
-rw-r--r--lld/ELF/Writer.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index b168e83cde2..ceeca1641cb 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -372,12 +372,9 @@ template <class ELFT> static bool isRelroSection(OutputSectionBase<ELFT> *Sec) {
return Config->ZNow;
if (Sec == Out<ELFT>::Dynamic || Sec == Out<ELFT>::Got)
return true;
-
- StringRef Name = Sec->getName();
- StringRef WhiteList[] = {".data.rel.ro", ".ctors", ".dtors", ".jcr",
- ".eh_frame"};
- return (std::find(std::begin(WhiteList), std::end(WhiteList), Name) !=
- std::end(WhiteList));
+ StringRef S = Sec->getName();
+ return S == ".data.rel.ro" || S == ".ctors" || S == ".dtors" || S == ".jcr" ||
+ S == ".eh_frame";
}
// Output section ordering is determined by this function.
OpenPOWER on IntegriCloud