diff options
author | Alexey Samsonov <samsonov@google.com> | 2014-03-13 07:52:54 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2014-03-13 07:52:54 +0000 |
commit | 72df68895059f778ae2f6b1264fc98415133b66e (patch) | |
tree | 108f0ecaea9e236ccc6de295a016abf039234b6a /lib/DebugInfo/DWARFDebugLoc.cpp | |
parent | 7c801675f8a0d079281fead832f0eb642ad3a6c5 (diff) | |
download | llvm-72df68895059f778ae2f6b1264fc98415133b66e.tar.gz llvm-72df68895059f778ae2f6b1264fc98415133b66e.tar.bz2 llvm-72df68895059f778ae2f6b1264fc98415133b66e.tar.xz |
[C++11] Convert DWARF parser to range-based for loops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203766 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/DebugInfo/DWARFDebugLoc.cpp')
-rw-r--r-- | lib/DebugInfo/DWARFDebugLoc.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/DebugInfo/DWARFDebugLoc.cpp b/lib/DebugInfo/DWARFDebugLoc.cpp index 8fe7481bbf..5f0ff0240d 100644 --- a/lib/DebugInfo/DWARFDebugLoc.cpp +++ b/lib/DebugInfo/DWARFDebugLoc.cpp @@ -15,19 +15,19 @@ using namespace llvm; void DWARFDebugLoc::dump(raw_ostream &OS) const { - for (LocationLists::const_iterator I = Locations.begin(), E = Locations.end(); I != E; ++I) { - OS << format("0x%8.8x: ", I->Offset); + for (const LocationList &L : Locations) { + OS << format("0x%8.8x: ", L.Offset); const unsigned Indent = 12; - for (SmallVectorImpl<Entry>::const_iterator I2 = I->Entries.begin(), E2 = I->Entries.end(); I2 != E2; ++I2) { - if (I2 != I->Entries.begin()) + for (const Entry &E : L.Entries) { + if (&E != L.Entries.begin()) OS.indent(Indent); - OS << "Beginning address offset: " << format("0x%016" PRIx64, I2->Begin) + OS << "Beginning address offset: " << format("0x%016" PRIx64, E.Begin) << '\n'; OS.indent(Indent) << " Ending address offset: " - << format("0x%016" PRIx64, I2->End) << '\n'; + << format("0x%016" PRIx64, E.End) << '\n'; OS.indent(Indent) << " Location description: "; - for (SmallVectorImpl<unsigned char>::const_iterator I3 = I2->Loc.begin(), E3 = I2->Loc.end(); I3 != E3; ++I3) { - OS << format("%2.2x ", *I3); + for (unsigned char Loc : E.Loc) { + OS << format("%2.2x ", Loc); } OS << "\n\n"; } |