projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b2e968
)
Make a local variable scope narrower. NFC.
author
Rui Ueyama
<ruiu@google.com>
Wed, 24 Oct 2018 13:42:33 +0000
(13:42 +0000)
committer
Rui Ueyama
<ruiu@google.com>
Wed, 24 Oct 2018 13:42:33 +0000
(13:42 +0000)
llvm-svn: 345138
lld/ELF/Writer.cpp
patch
|
blob
|
history
diff --git
a/lld/ELF/Writer.cpp
b/lld/ELF/Writer.cpp
index
60f5ff9
..
77ef252
100644
(file)
--- 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);
}