diff options
| author | Rui Ueyama <ruiu@google.com> | 2016-11-18 19:45:04 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2016-11-18 19:45:04 +0000 |
| commit | 5c851a5a6d4de8cb6e4a15237ef17a9df0bd2ca5 (patch) | |
| tree | cf7030c22870b37aca0e91a559d0198266f5c2f6 | |
| parent | ae032b6cf553bc9a274bcc2f30a68323a3296b98 (diff) | |
| download | bcm5719-llvm-5c851a5a6d4de8cb6e4a15237ef17a9df0bd2ca5.tar.gz bcm5719-llvm-5c851a5a6d4de8cb6e4a15237ef17a9df0bd2ca5.zip | |
Simplify. NFC.
llvm-svn: 287372
| -rw-r--r-- | lld/ELF/OutputSections.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index b04d969548d..761d2316b50 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -604,15 +604,11 @@ template <class ELFT> void MergeOutputSection<ELFT>::finalize() { // finalize() fixed tail-optimized strings, so we can now get // offsets of strings. Get an offset for each string and save it // to a corresponding StringPiece for easy access. - if (shouldTailMerge()) { - for (MergeInputSection<ELFT> *Sec : Sections) { - for (size_t I = 0, E = Sec->Pieces.size(); I != E; ++I) { - if (!Sec->Pieces[I].Live) - continue; - Sec->Pieces[I].OutputOff = Builder.getOffset(Sec->getData(I)); - } - } - } + if (shouldTailMerge()) + for (MergeInputSection<ELFT> *Sec : Sections) + for (size_t I = 0, E = Sec->Pieces.size(); I != E; ++I) + if (Sec->Pieces[I].Live) + Sec->Pieces[I].OutputOff = Builder.getOffset(Sec->getData(I)); } template <class ELFT> |

