LLVM  3.7.0
Public Member Functions | List of all members
llvm::DwarfTypeUnit Class Reference

#include <DwarfUnit.h>

Inheritance diagram for llvm::DwarfTypeUnit:
[legend]
Collaboration diagram for llvm::DwarfTypeUnit:
[legend]

Public Member Functions

 DwarfTypeUnit (unsigned UID, DwarfCompileUnit &CU, AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU, MCDwarfDwoLineTable *SplitLineTable=nullptr)
 
void setTypeSignature (uint64_t Signature)
 
uint64_t getTypeSignature () const
 
void setType (const DIE *Ty)
 
void emitHeader (bool UseOffsets) override
 Emit the header for this unit, not including the initial length field. More...
 
unsigned getHeaderSize () const override
 Compute the size of a header for this unit, not including the initial length field. More...
 
DwarfCompileUnitgetCU () override
 
- Public Member Functions inherited from llvm::DwarfUnit
virtual ~DwarfUnit ()
 
void initSection (MCSection *Section)
 
MCSectiongetSection () const
 
AsmPrintergetAsmPrinter () const
 
unsigned getUniqueID () const
 
uint16_t getLanguage () const
 
const DICompileUnitgetCUNode () const
 
DIEgetUnitDie ()
 
unsigned getDebugInfoOffset () const
 
void setDebugInfoOffset (unsigned DbgInfoOff)
 
bool hasContent () const
 Return true if this compile unit has something to write out. More...
 
std::string getParentContextString (const DIScope *Context) const
 Get string containing language specific context for a global name. More...
 
virtual void addGlobalName (StringRef Name, DIE &Die, const DIScope *Context)
 Add a new global name to the compile unit. More...
 
virtual void addGlobalType (const DIType *Ty, const DIE &Die, const DIScope *Context)
 Add a new global type to the compile unit. More...
 
void addAccelNamespace (StringRef Name, const DIE &Die)
 Add a new name to the namespace accelerator table. More...
 
DIEgetDIE (const DINode *D) const
 Returns the DIE map slot for the specified debug variable. More...
 
DIELocgetDIELoc ()
 Returns a fresh newly allocated DIELoc. More...
 
void insertDIE (const DINode *Desc, DIE *D)
 Insert DIE into the map. More...
 
void addFlag (DIE &Die, dwarf::Attribute Attribute)
 Add a flag that is true to the DIE. More...
 
void addUInt (DIE &Die, dwarf::Attribute Attribute, Optional< dwarf::Form > Form, uint64_t Integer)
 Add an unsigned integer attribute data and value. More...
 
void addUInt (DIE &Block, dwarf::Form Form, uint64_t Integer)
 
void addSInt (DIE &Die, dwarf::Attribute Attribute, Optional< dwarf::Form > Form, int64_t Integer)
 Add an signed integer attribute data and value. More...
 
void addSInt (DIELoc &Die, Optional< dwarf::Form > Form, int64_t Integer)
 
void addString (DIE &Die, dwarf::Attribute Attribute, StringRef Str)
 Add a string attribute data and value. More...
 
DIE::value_iterator addLabel (DIE &Die, dwarf::Attribute Attribute, dwarf::Form Form, const MCSymbol *Label)
 Add a Dwarf label attribute data and value. More...
 
void addLabel (DIELoc &Die, dwarf::Form Form, const MCSymbol *Label)
 
void addSectionOffset (DIE &Die, dwarf::Attribute Attribute, uint64_t Integer)
 Add an offset into a section attribute data and value. More...
 
void addOpAddress (DIELoc &Die, const MCSymbol *Label)
 Add a dwarf op address data and value using the form given and an op of either DW_FORM_addr or DW_FORM_GNU_addr_index. More...
 
void addLabelDelta (DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Hi, const MCSymbol *Lo)
 Add a label delta attribute data and value. More...
 
void addDIEEntry (DIE &Die, dwarf::Attribute Attribute, DIE &Entry)
 Add a DIE attribute data and value. More...
 
void addDIEEntry (DIE &Die, dwarf::Attribute Attribute, DIEEntry Entry)
 Add a DIE attribute data and value. More...
 
void addDIETypeSignature (DIE &Die, const DwarfTypeUnit &Type)
 
void addBlock (DIE &Die, dwarf::Attribute Attribute, DIELoc *Block)
 Add block data. More...
 
void addBlock (DIE &Die, dwarf::Attribute Attribute, DIEBlock *Block)
 Add block data. More...
 
void addSourceLine (DIE &Die, unsigned Line, StringRef File, StringRef Directory)
 Add location information to specified debug information entry. More...
 
void addSourceLine (DIE &Die, const DILocalVariable *V)
 
void addSourceLine (DIE &Die, const DIGlobalVariable *G)
 
void addSourceLine (DIE &Die, const DISubprogram *SP)
 
void addSourceLine (DIE &Die, const DIType *Ty)
 
void addSourceLine (DIE &Die, const DINamespace *NS)
 
void addSourceLine (DIE &Die, const DIObjCProperty *Ty)
 
void addConstantValue (DIE &Die, const MachineOperand &MO, const DIType *Ty)
 Add constant value entry in variable DIE. More...
 
void addConstantValue (DIE &Die, const ConstantInt *CI, const DIType *Ty)
 
void addConstantValue (DIE &Die, const APInt &Val, const DIType *Ty)
 
void addConstantValue (DIE &Die, const APInt &Val, bool Unsigned)
 
void addConstantValue (DIE &Die, bool Unsigned, uint64_t Val)
 
void addConstantFPValue (DIE &Die, const MachineOperand &MO)
 Add constant value entry in variable DIE. More...
 
void addConstantFPValue (DIE &Die, const ConstantFP *CFP)
 
void addLinkageName (DIE &Die, StringRef LinkageName)
 Add a linkage name, if it isn't empty. More...
 
void addTemplateParams (DIE &Buffer, DINodeArray TParams)
 Add template parameters in buffer. More...
 
bool addRegisterOpPiece (DIELoc &TheDie, unsigned Reg, unsigned SizeInBits=0, unsigned OffsetInBits=0)
 Add register operand. More...
 
bool addRegisterOffset (DIELoc &TheDie, unsigned Reg, int64_t Offset)
 Add register offset. More...
 
void addBlockByrefAddress (const DbgVariable &DV, DIE &Die, dwarf::Attribute Attribute, const MachineLocation &Location)
 Start with the address based on the location provided, and generate the DWARF information necessary to find the actual Block variable (navigating the Block struct) based on the starting location. More...
 
void addType (DIE &Entity, const DIType *Ty, dwarf::Attribute Attribute=dwarf::DW_AT_type)
 Add a new type attribute to the specified entity. More...
 
DIEgetOrCreateNameSpace (const DINamespace *NS)
 
DIEgetOrCreateModule (const DIModule *M)
 
DIEgetOrCreateSubprogramDIE (const DISubprogram *SP, bool Minimal=false)
 
void applySubprogramAttributes (const DISubprogram *SP, DIE &SPDie, bool Minimal=false)
 
DIEgetOrCreateTypeDIE (const MDNode *N)
 Find existing DIE or create new DIE for the given type. More...
 
DIEcreateTypeDIE (const DICompositeType *Ty)
 Get context owner's DIE. More...
 
DIEgetOrCreateContextDIE (const DIScope *Context)
 Get context owner's DIE. More...
 
void constructContainingTypeDIEs ()
 Construct DIEs for types that contain vtables. More...
 
void constructSubprogramArguments (DIE &Buffer, DITypeRefArray Args)
 Construct function argument DIEs. More...
 
DIEcreateAndAddDIE (unsigned Tag, DIE &Parent, const DINode *N=nullptr)
 Create a DIE with the given Tag, add the DIE to its parent, and call insertDIE if MD is not null. More...
 
void constructTypeDIE (DIE &Buffer, const DICompositeType *CTy)
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::DwarfUnit
 DwarfUnit (unsigned UID, dwarf::Tag, const DICompileUnit *CU, AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU)
 
void addLocalString (DIE &Die, dwarf::Attribute Attribute, StringRef Str)
 Add a string attribute data and value. More...
 
void addIndexedString (DIE &Die, dwarf::Attribute Attribute, StringRef Str)
 
bool applySubprogramDefinitionAttributes (const DISubprogram *SP, DIE &SPDie)
 
DIEgetOrCreateStaticMemberDIE (const DIDerivedType *DT)
 Create new static data member DIE. More...
 
template<typename T >
Tresolve (TypedDINodeRef< T > Ref) const
 Look in the DwarfDebug map for the MDNode that corresponds to the reference. More...
 
- Protected Attributes inherited from llvm::DwarfUnit
unsigned UniqueID
 A numeric ID unique among all CUs in the module. More...
 
const DICompileUnitCUNode
 MDNode for the compile unit. More...
 
BumpPtrAllocator DIEValueAllocator
 
DIEUnitDie
 Unit debug information entry. More...
 
unsigned DebugInfoOffset
 Offset of the UnitDie from beginning of debug info section. More...
 
AsmPrinterAsm
 Target of Dwarf emission. More...
 
DwarfDebugDD
 
DwarfFileDU
 
DIEIndexTyDie
 An anonymous type for index type. Owned by UnitDie. More...
 
DenseMap< const MDNode *, DIE * > MDNodeToDieMap
 Tracks the mapping of unit level debug information variables to debug information entries. More...
 
std::vector< DIEBlock * > DIEBlocks
 A list of all the DIEBlocks in use. More...
 
std::vector< DIELoc * > DIELocs
 A list of all the DIELocs in use. More...
 
DenseMap< DIE *, const DINode * > ContainingTypeMap
 This map is used to keep track of subprogram DIEs that need DW_AT_containing_type attribute. More...
 
MCSectionSection
 The section this unit will be emitted in. More...
 

Detailed Description

Definition at line 380 of file DwarfUnit.h.

Constructor & Destructor Documentation

DwarfTypeUnit::DwarfTypeUnit ( unsigned  UID,
DwarfCompileUnit CU,
AsmPrinter A,
DwarfDebug DW,
DwarfFile DWU,
MCDwarfDwoLineTable SplitLineTable = nullptr 
)

Member Function Documentation

void DwarfTypeUnit::emitHeader ( bool  UseOffsets)
overridevirtual

Emit the header for this unit, not including the initial length field.

Reimplemented from llvm::DwarfUnit.

Definition at line 1513 of file DwarfUnit.cpp.

References llvm::DwarfUnit::Asm, llvm::DwarfUnit::emitHeader(), and llvm::AsmPrinter::OutStreamer.

DwarfCompileUnit& llvm::DwarfTypeUnit::getCU ( )
inlineoverridevirtual

Implements llvm::DwarfUnit.

Definition at line 404 of file DwarfUnit.h.

unsigned llvm::DwarfTypeUnit::getHeaderSize ( ) const
inlineoverridevirtual

Compute the size of a header for this unit, not including the initial length field.

Reimplemented from llvm::DwarfUnit.

Definition at line 400 of file DwarfUnit.h.

References llvm::DwarfUnit::getHeaderSize().

uint64_t llvm::DwarfTypeUnit::getTypeSignature ( ) const
inline
void llvm::DwarfTypeUnit::setType ( const DIE Ty)
inline

Definition at line 396 of file DwarfUnit.h.

void llvm::DwarfTypeUnit::setTypeSignature ( uint64_t  Signature)
inline

Definition at line 394 of file DwarfUnit.h.


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