[lld] r316002 - [ELF] - Simplify. NFC.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 17 07:31:29 PDT 2017
Author: grimar
Date: Tue Oct 17 07:31:29 2017
New Revision: 316002
URL: http://llvm.org/viewvc/llvm-project?rev=316002&view=rev
Log:
[ELF] - 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=316002&r1=316001&r2=316002&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Tue Oct 17 07:31:29 2017
@@ -930,11 +930,10 @@ template <class ELFT> void Writer<ELFT>:
if (OutputSections[I] == LastRW->FirstSec)
break;
- for (; I < OutputSections.size(); ++I) {
- if (OutputSections[I]->Type != SHT_NOBITS)
- continue;
- break;
- }
+ for (; I < OutputSections.size(); ++I)
+ if (OutputSections[I]->Type == SHT_NOBITS)
+ break;
+
if (ElfSym::Edata1)
ElfSym::Edata1->Section = OutputSections[I - 1];
if (ElfSym::Edata2)
More information about the llvm-commits
mailing list