Simplify. NFC.

llvm-svn: 287372
This commit is contained in:
Rui Ueyama 2016-11-18 19:45:04 +00:00
parent ae032b6cf5
commit 5c851a5a6d
1 changed files with 5 additions and 9 deletions

View File

@ -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>