summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-01-30 18:07:45 +0000
committerZachary Turner <zturner@google.com>2015-01-30 18:07:45 +0000
commit82af9438d0fa27b21f75bdea5832f1baa5450863 (patch)
tree9e9412193579d574cdeabcd07de3e868795cfd4a /llvm/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp
parent51702e6e7539afabe8cf34b11bd6b6974e203054 (diff)
downloadbcm5719-llvm-82af9438d0fa27b21f75bdea5832f1baa5450863.tar.gz
bcm5719-llvm-82af9438d0fa27b21f75bdea5832f1baa5450863.zip
Move DebugInfo to DebugInfo/DWARF.
In preparation for adding PDB support to LLVM, this moves the DWARF parsing code to its own subdirectory under DebugInfo, and renames LLVMDebugInfo to LLVMDebugInfoDWARF. This is purely a mechanical / build system change. Differential Revision: http://reviews.llvm.org/D7269 Reviewed by: Eric Christopher llvm-svn: 227586
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp b/llvm/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp
new file mode 100644
index 00000000000..01e724799ab
--- /dev/null
+++ b/llvm/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp
@@ -0,0 +1,32 @@
+//===-- DWARFCompileUnit.cpp ----------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/DebugInfo/DWARF/DWARFCompileUnit.h"
+#include "llvm/Support/Format.h"
+#include "llvm/Support/raw_ostream.h"
+
+using namespace llvm;
+
+void DWARFCompileUnit::dump(raw_ostream &OS) {
+ OS << format("0x%08x", getOffset()) << ": Compile Unit:"
+ << " length = " << format("0x%08x", getLength())
+ << " version = " << format("0x%04x", getVersion())
+ << " abbr_offset = " << format("0x%04x", getAbbreviations()->getOffset())
+ << " addr_size = " << format("0x%02x", getAddressByteSize())
+ << " (next unit at " << format("0x%08x", getNextUnitOffset())
+ << ")\n";
+
+ const DWARFDebugInfoEntryMinimal *CU = getCompileUnitDIE(false);
+ assert(CU && "Null Compile Unit?");
+ CU->dump(OS, this, -1U);
+}
+
+// VTable anchor.
+DWARFCompileUnit::~DWARFCompileUnit() {
+}
OpenPOWER on IntegriCloud