LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DWARFCompileUnit.cpp
Go to the documentation of this file.
1 //===-- DWARFCompileUnit.cpp ----------------------------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #include "DWARFCompileUnit.h"
11 #include "llvm/Support/Format.h"
13 
14 using namespace llvm;
15 
17  OS << format("0x%08x", getOffset()) << ": Compile Unit:"
18  << " length = " << format("0x%08x", getLength())
19  << " version = " << format("0x%04x", getVersion())
20  << " abbr_offset = " << format("0x%04x", getAbbreviations()->getOffset())
21  << " addr_size = " << format("0x%02x", getAddressByteSize())
22  << " (next unit at " << format("0x%08x", getNextUnitOffset())
23  << ")\n";
24 
26  assert(CU && "Null Compile Unit?");
27  CU->dump(OS, this, -1U);
28 }
29 
30 // VTable anchor.
32 }
const DWARFDebugInfoEntryMinimal * getCompileUnitDIE(bool extract_cu_die_only=true)
Definition: DWARFUnit.h:125
uint32_t getNextUnitOffset() const
Definition: DWARFUnit.h:109
const DWARFAbbreviationDeclarationSet * getAbbreviations() const
Definition: DWARFUnit.h:114
uint32_t getLength() const
Definition: DWARFUnit.h:112
~DWARFCompileUnit() LLVM_OVERRIDE
format_object1< T > format(const char *Fmt, const T &Val)
Definition: Format.h:180
uint16_t getVersion() const
Definition: DWARFUnit.h:113
DWARFDebugInfoEntryMinimal - A DIE with only the minimum required data.
void dump(raw_ostream &OS)
void dump(raw_ostream &OS, const DWARFUnit *u, unsigned recurseDepth, unsigned indent=0) const
uint32_t getOffset() const
Definition: DWARFUnit.h:105
uint8_t getAddressByteSize() const
Definition: DWARFUnit.h:117