[lld] r258796 - Simplify. NFC.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 25 23:17:29 PST 2016


Author: ruiu
Date: Tue Jan 26 01:17:29 2016
New Revision: 258796

URL: http://llvm.org/viewvc/llvm-project?rev=258796&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=258796&r1=258795&r2=258796&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Tue Jan 26 01:17:29 2016
@@ -356,11 +356,9 @@ void Writer<ELFT>::scanRelocs(
 }
 
 template <class ELFT> void Writer<ELFT>::scanRelocs(InputSection<ELFT> &C) {
-  if (!(C.getSectionHdr()->sh_flags & SHF_ALLOC))
-    return;
-
-  for (const Elf_Shdr *RelSec : C.RelocSections)
-    scanRelocs(C, *RelSec);
+  if (C.getSectionHdr()->sh_flags & SHF_ALLOC)
+    for (const Elf_Shdr *RelSec : C.RelocSections)
+      scanRelocs(C, *RelSec);
 }
 
 template <class ELFT>




More information about the llvm-commits mailing list