[docs] Update link title
[oota-llvm.git] / lib / DebugInfo / DWARFDebugFrame.cpp
index d5f1f196583599cb565a3591168f774e3d3853ac..5bf7b070b8e38de15ef34a5e6e9b3795cfd6a9ae 100644 (file)
@@ -186,10 +186,8 @@ void FrameEntry::parseInstructions(uint32_t *Offset, uint32_t EndOffset) {
 void FrameEntry::dumpInstructions(raw_ostream &OS) const {
   // TODO: at the moment only instruction names are dumped. Expand this to
   // dump operands as well.
-  for (std::vector<Instruction>::const_iterator I = Instructions.begin(),
-                                                E = Instructions.end();
-       I != E; ++I) {
-    uint8_t Opcode = I->Opcode;
+  for (const auto &Instr : Instructions) {
+    uint8_t Opcode = Instr.Opcode;
     if (Opcode & DWARF_CFI_PRIMARY_OPCODE_MASK)
       Opcode &= DWARF_CFI_PRIMARY_OPCODE_MASK;
     OS << "  " << CallFrameString(Opcode) << ":\n";
@@ -214,7 +212,7 @@ public:
   ~CIE() {
   }
 
-  void dumpHeader(raw_ostream &OS) const {
+  void dumpHeader(raw_ostream &OS) const override {
     OS << format("%08x %08x %08x CIE",
                  (uint32_t)Offset, (uint32_t)Length, DW_CIE_ID)
        << "\n";
@@ -258,7 +256,7 @@ public:
   ~FDE() {
   }
 
-  void dumpHeader(raw_ostream &OS) const {
+  void dumpHeader(raw_ostream &OS) const override {
     OS << format("%08x %08x %08x FDE ",
                  (uint32_t)Offset, (uint32_t)Length, (int32_t)LinkedCIEOffset);
     OS << format("cie=%08x pc=%08x...%08x\n",
@@ -289,9 +287,8 @@ DWARFDebugFrame::DWARFDebugFrame() {
 
 
 DWARFDebugFrame::~DWARFDebugFrame() {
-  for (EntryVector::iterator I = Entries.begin(), E = Entries.end();
-       I != E; ++I) {
-    delete *I;
+  for (const auto &Entry : Entries) {
+    delete Entry;
   }
 }
 
@@ -381,9 +378,7 @@ void DWARFDebugFrame::parse(DataExtractor Data) {
 
 void DWARFDebugFrame::dump(raw_ostream &OS) const {
   OS << "\n";
-  for (EntryVector::const_iterator I = Entries.begin(), E = Entries.end();
-       I != E; ++I) {
-    FrameEntry *Entry = *I;
+  for (const auto &Entry : Entries) {
     Entry->dumpHeader(OS);
     Entry->dumpInstructions(OS);
     OS << "\n";