LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
llvm::DwarfUnits Class Reference

Collects and handles information specific to a particular collection of units. More...

#include <DwarfDebug.h>

Public Member Functions

 DwarfUnits (AsmPrinter *AP, FoldingSet< DIEAbbrev > *AS, std::vector< DIEAbbrev * > &A, const char *Pref, BumpPtrAllocator &DA)
 
unsigned computeSizeAndOffset (DIE *Die, unsigned Offset)
 Compute the size and offset of a DIE given an incoming Offset. More...
 
void computeSizeAndOffsets ()
 Compute the size and offset of all the DIEs. More...
 
void assignAbbrevNumber (DIEAbbrev &Abbrev)
 Define a unique number for the abbreviation. More...
 
void addUnit (CompileUnit *CU)
 Add a unit to the list of CUs. More...
 
void emitUnits (DwarfDebug *DD, const MCSection *USection, const MCSection *ASection, const MCSymbol *ASectionSym)
 Emit all of the units to the section listed with the given abbreviation section. More...
 
void emitStrings (const MCSection *StrSection, const MCSection *OffsetSection, const MCSymbol *StrSecSym)
 Emit all of the strings to the section given. More...
 
void emitAddresses (const MCSection *AddrSection)
 Emit all of the addresses to the section given. More...
 
MCSymbolgetStringPoolSym ()
 Returns the entry into the start of the pool. More...
 
MCSymbolgetStringPoolEntry (StringRef Str)
 Returns an entry into the string pool with the given string text. More...
 
unsigned getStringPoolIndex (StringRef Str)
 Returns the index into the string pool with the given string text. More...
 
StrPoolgetStringPool ()
 Returns the string pool. More...
 
unsigned getAddrPoolIndex (const MCExpr *Sym)
 Returns the index into the address pool with the given label/symbol. More...
 
unsigned getAddrPoolIndex (const MCSymbol *Sym)
 
AddrPoolgetAddrPool ()
 Returns the address pool. More...
 

Detailed Description

Collects and handles information specific to a particular collection of units.

Definition at line 221 of file DwarfDebug.h.

Constructor & Destructor Documentation

llvm::DwarfUnits::DwarfUnits ( AsmPrinter AP,
FoldingSet< DIEAbbrev > *  AS,
std::vector< DIEAbbrev * > &  A,
const char *  Pref,
BumpPtrAllocator DA 
)
inline

Definition at line 251 of file DwarfDebug.h.

Member Function Documentation

void llvm::DwarfUnits::addUnit ( CompileUnit CU)
inline

Add a unit to the list of CUs.

Definition at line 268 of file DwarfDebug.h.

void DwarfUnits::assignAbbrevNumber ( DIEAbbrev Abbrev)

Define a unique number for the abbreviation.

Definition at line 275 of file DwarfDebug.cpp.

References llvm::DIEAbbrev::getNumber(), and llvm::DIEAbbrev::setNumber().

Referenced by computeSizeAndOffset().

unsigned DwarfUnits::computeSizeAndOffset ( DIE Die,
unsigned  Offset 
)
void DwarfUnits::computeSizeAndOffsets ( )

Compute the size and offset of all the DIEs.

Definition at line 1970 of file DwarfDebug.cpp.

References computeSizeAndOffset(), and I.

void DwarfUnits::emitAddresses ( const MCSection AddrSection)
void DwarfUnits::emitStrings ( const MCSection StrSection,
const MCSection OffsetSection = NULL,
const MCSymbol StrSecSym = NULL 
)
void DwarfUnits::emitUnits ( DwarfDebug DD,
const MCSection USection,
const MCSection ASection,
const MCSymbol ASectionSym 
)
AddrPool* llvm::DwarfUnits::getAddrPool ( )
inline

Returns the address pool.

Definition at line 302 of file DwarfDebug.h.

unsigned DwarfUnits::getAddrPoolIndex ( const MCExpr Sym)

Returns the index into the address pool with the given label/symbol.

Definition at line 265 of file DwarfDebug.cpp.

References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::insert(), and P.

Referenced by llvm::CompileUnit::addLabelAddress(), llvm::CompileUnit::addOpAddress(), llvm::CompileUnit::createGlobalVariableDIE(), and getAddrPoolIndex().

unsigned DwarfUnits::getAddrPoolIndex ( const MCSymbol Sym)
StrPool* llvm::DwarfUnits::getStringPool ( )
inline

Returns the string pool.

Definition at line 294 of file DwarfDebug.h.

MCSymbol * DwarfUnits::getStringPoolEntry ( StringRef  Str)
unsigned DwarfUnits::getStringPoolIndex ( StringRef  Str)

Returns the index into the string pool with the given string text.

Definition at line 251 of file DwarfDebug.cpp.

References llvm::AsmPrinter::GetTempSymbol().

Referenced by llvm::CompileUnit::addString().

MCSymbol * DwarfUnits::getStringPoolSym ( )

Returns the entry into the start of the pool.

Definition at line 238 of file DwarfDebug.cpp.

References llvm::AsmPrinter::GetTempSymbol().

Referenced by llvm::CompileUnit::addLocalString(), and llvm::CompileUnit::addString().


The documentation for this class was generated from the following files: