[lld] r252716 - Simplify. NFC.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 11 01:57:08 PST 2015


Author: rafael
Date: Wed Nov 11 03:57:08 2015
New Revision: 252716

URL: http://llvm.org/viewvc/llvm-project?rev=252716&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=252716&r1=252715&r2=252716&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Wed Nov 11 03:57:08 2015
@@ -554,8 +554,7 @@ template <class ELFT> void Writer<ELFT>:
   for (const std::unique_ptr<ObjectFile<ELFT>> &F : Symtab.getObjectFiles())
     for (InputSectionBase<ELFT> *B : F->getSections())
       if (auto *S = dyn_cast_or_null<InputSection<ELFT>>(B))
-        if (S != &InputSection<ELFT>::Discarded)
-          if (S->isLive())
+        if (S != &InputSection<ELFT>::Discarded && S->isLive())
             scanRelocs(*S);
 
   std::vector<DefinedCommon<ELFT> *> CommonSymbols;




More information about the llvm-commits mailing list