diff --git a/llvm/lib/DWARFLinker/Parallel/DWARFLinkerUnit.cpp b/llvm/lib/DWARFLinker/Parallel/DWARFLinkerUnit.cpp index 93def34aa4fda4..c992a2321c14be 100644 --- a/llvm/lib/DWARFLinker/Parallel/DWARFLinkerUnit.cpp +++ b/llvm/lib/DWARFLinker/Parallel/DWARFLinkerUnit.cpp @@ -70,9 +70,7 @@ void DwarfUnit::emitDwarfAbbrevEntry(const DIEAbbrev &Abbrev, // For each attribute description. const SmallVectorImpl &Data = Abbrev.getData(); - for (unsigned i = 0, N = Data.size(); i < N; ++i) { - const DIEAbbrevData &AttrData = Data[i]; - + for (const DIEAbbrevData &AttrData : Data) { // Emit attribute type. encodeULEB128(AttrData.getAttribute(), AbbrevSection.OS);