[lld] r257527 - Merge two consecutive if's. NFC.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 12 13:57:45 PST 2016


Author: ruiu
Date: Tue Jan 12 15:57:44 2016
New Revision: 257527

URL: http://llvm.org/viewvc/llvm-project?rev=257527&view=rev
Log:
Merge two consecutive if's. NFC.

Modified:
    lld/trunk/ELF/MarkLive.cpp

Modified: lld/trunk/ELF/MarkLive.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/MarkLive.cpp?rev=257527&r1=257526&r2=257527&view=diff
==============================================================================
--- lld/trunk/ELF/MarkLive.cpp (original)
+++ lld/trunk/ELF/MarkLive.cpp Tue Jan 12 15:57:44 2016
@@ -116,9 +116,8 @@ template <class ELFT> void elf2::markLiv
   // Preserve special sections.
   for (const std::unique_ptr<ObjectFile<ELFT>> &F : Symtab->getObjectFiles())
     for (InputSectionBase<ELFT> *Sec : F->getSections())
-      if (Sec && Sec != &InputSection<ELFT>::Discarded)
-        if (isReserved(Sec))
-          Enqueue(Sec);
+      if (Sec && Sec != &InputSection<ELFT>::Discarded && isReserved(Sec))
+        Enqueue(Sec);
 
   // Mark all reachable sections.
   while (!Q.empty())




More information about the llvm-commits mailing list