LLVM API Documentation
00001 //===-- DWARFCompileUnit.cpp ----------------------------------------------===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 00010 #include "DWARFCompileUnit.h" 00011 #include "llvm/Support/Format.h" 00012 #include "llvm/Support/raw_ostream.h" 00013 00014 using namespace llvm; 00015 00016 void DWARFCompileUnit::dump(raw_ostream &OS) { 00017 OS << format("0x%08x", getOffset()) << ": Compile Unit:" 00018 << " length = " << format("0x%08x", getLength()) 00019 << " version = " << format("0x%04x", getVersion()) 00020 << " abbr_offset = " << format("0x%04x", getAbbreviations()->getOffset()) 00021 << " addr_size = " << format("0x%02x", getAddressByteSize()) 00022 << " (next unit at " << format("0x%08x", getNextUnitOffset()) 00023 << ")\n"; 00024 00025 const DWARFDebugInfoEntryMinimal *CU = getCompileUnitDIE(false); 00026 assert(CU && "Null Compile Unit?"); 00027 CU->dump(OS, this, -1U); 00028 } 00029 00030 // VTable anchor. 00031 DWARFCompileUnit::~DWARFCompileUnit() { 00032 }