[lld] r255284 - Simplify. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 10 11:19:04 PST 2015
Author: ruiu
Date: Thu Dec 10 13:19:04 2015
New Revision: 255284
URL: http://llvm.org/viewvc/llvm-project?rev=255284&view=rev
Log:
Simplify. NFC.
Modified:
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=255284&r1=255283&r2=255284&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Thu Dec 10 13:19:04 2015
@@ -372,12 +372,9 @@ template <class ELFT> static bool isRelr
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.
More information about the llvm-commits
mailing list