Use range-based for.

llvm-svn: 270523
This commit is contained in:
Rui Ueyama 2016-05-24 02:10:28 +00:00
parent 6de2e6829d
commit b7eda28aaa
1 changed files with 1 additions and 4 deletions

View File

@ -1250,12 +1250,9 @@ void MergeOutputSection<ELFT>::addSection(InputSectionBase<ELFT> *C) {
this->updateAlign(Sec->Align);
this->Header.sh_entsize = Sec->getSectionHdr()->sh_entsize;
ArrayRef<uint8_t> D = Sec->getSectionData();
StringRef Data((const char *)D.data(), D.size());
bool IsString = this->Header.sh_flags & SHF_STRINGS;
for (size_t I = 0, N = Sec->Pieces.size(); I != N; ++I) {
SectionPiece &Piece = Sec->Pieces[I];
for (SectionPiece &Piece : Sec->Pieces) {
if (!Piece.Live)
continue;
uintX_t OutputOffset = Builder.add(toStringRef(Piece.Data));