From 5c851a5a6d4de8cb6e4a15237ef17a9df0bd2ca5 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Fri, 18 Nov 2016 19:45:04 +0000 Subject: [PATCH] Simplify. NFC. llvm-svn: 287372 --- lld/ELF/OutputSections.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index b04d969..761d231 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -604,15 +604,11 @@ template void MergeOutputSection::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 *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 *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 -- 2.7.4