DWARFDebugFrame: Move some code around. NFC.
authorFrederic Riss <friss@apple.com>
Wed, 25 Feb 2015 21:30:16 +0000 (21:30 +0000)
committerFrederic Riss <friss@apple.com>
Wed, 25 Feb 2015 21:30:16 +0000 (21:30 +0000)
Move the FrameEntry::dumpInstructions down in the file at some
place where it can see the declarations of FDE and CIE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230549 91177308-0d34-0410-b5e6-96231b3b80d8

lib/DebugInfo/DWARF/DWARFDebugFrame.cpp

index 64f844b6f62bb884af11a5c103cc1318d466ccd9..aca560c4216a7ce069caf78dcc8306da43bc6d50 100644 (file)
@@ -179,19 +179,6 @@ void FrameEntry::parseInstructions(DataExtractor Data, uint32_t *Offset,
   }
 }
 
-
-void FrameEntry::dumpInstructions(raw_ostream &OS) const {
-  // TODO: at the moment only instruction names are dumped. Expand this to
-  // dump operands as well.
-  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";
-  }
-}
-
-
 namespace {
 /// \brief DWARF Common Information Entry (CIE)
 class CIE : public FrameEntry {
@@ -285,6 +272,16 @@ private:
 };
 } // end anonymous namespace
 
+void FrameEntry::dumpInstructions(raw_ostream &OS) const {
+  // TODO: at the moment only instruction names are dumped. Expand this to
+  // dump operands as well.
+  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";
+  }
+}
 
 DWARFDebugFrame::DWARFDebugFrame() {
 }