diff options
| author | Rui Ueyama <ruiu@google.com> | 2018-10-24 13:42:33 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2018-10-24 13:42:33 +0000 |
| commit | ee2b61cfd3cd1576b93437b213f2da0266c2969d (patch) | |
| tree | b2ee9d41ffbfb975acb0466d2dca1282f9cfae06 | |
| parent | 5b2e968264b4bd80e4ba0650cdd7e0e56b0f8cdd (diff) | |
| download | bcm5719-llvm-ee2b61cfd3cd1576b93437b213f2da0266c2969d.tar.gz bcm5719-llvm-ee2b61cfd3cd1576b93437b213f2da0266c2969d.zip | |
Make a local variable scope narrower. NFC.
llvm-svn: 345138
| -rw-r--r-- | lld/ELF/Writer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 60f5ff9d19f..77ef2525ef6 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -1675,9 +1675,9 @@ template <class ELFT> void Writer<ELFT>::finalizeSections() { // particularly relevant. Out::ElfHeader->SectionIndex = 1; - unsigned I = 1; - for (OutputSection *Sec : OutputSections) { - Sec->SectionIndex = I++; + for (size_t I = 0, E = OutputSections.size(); I != E; ++I) { + OutputSection *Sec = OutputSections[I]; + Sec->SectionIndex = I + 1; Sec->ShName = In.ShStrTab->addString(Sec->Name); } |

