2011-09-13 19:42:23 +00:00
|
|
|
//===-- DWARFCompileUnit.cpp ----------------------------------------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-12-19 18:26:33 +00:00
|
|
|
#include "llvm/DebugInfo/DWARFCompileUnit.h"
|
2011-09-13 19:42:23 +00:00
|
|
|
#include "llvm/Support/Format.h"
|
|
|
|
#include "llvm/Support/raw_ostream.h"
|
|
|
|
|
2013-09-23 22:44:40 +00:00
|
|
|
using namespace llvm;
|
2011-09-13 19:42:23 +00:00
|
|
|
|
|
|
|
void DWARFCompileUnit::dump(raw_ostream &OS) {
|
2013-09-23 22:44:40 +00:00
|
|
|
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())
|
2011-09-13 19:42:23 +00:00
|
|
|
<< ")\n";
|
|
|
|
|
2012-08-23 23:21:11 +00:00
|
|
|
const DWARFDebugInfoEntryMinimal *CU = getCompileUnitDIE(false);
|
|
|
|
assert(CU && "Null Compile Unit?");
|
|
|
|
CU->dump(OS, this, -1U);
|
2011-09-13 19:42:23 +00:00
|
|
|
}
|
|
|
|
|
2013-09-23 22:44:40 +00:00
|
|
|
// VTable anchor.
|
|
|
|
DWARFCompileUnit::~DWARFCompileUnit() {
|
2013-08-27 09:20:22 +00:00
|
|
|
}
|