LLVM API Documentation

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

#include <DwarfCompileUnit.h>

Public Member Functions

 CompileUnit (unsigned UID, DIE *D, DICompileUnit CU, AsmPrinter *A, DwarfDebug *DW, DwarfUnits *DWU)
 CompileUnit - Compile unit constructor. More...
 
 ~CompileUnit ()
 ~CompileUnit - Destructor for compile unit. More...
 
unsigned getUniqueID () const
 
uint16_t getLanguage () const
 
DICompileUnit getNode () const
 
DIEgetCUDie () const
 
const StringMap< DIE * > & getGlobalNames () const
 
const StringMap< DIE * > & getGlobalTypes () const
 
const StringMap< std::vector
< DIE * > > & 
getAccelNames () const
 
const StringMap< std::vector
< DIE * > > & 
getAccelObjC () const
 
const StringMap< std::vector
< DIE * > > & 
getAccelNamespace () const
 
const StringMap< std::vector
< std::pair< DIE *, unsigned > > > & 
getAccelTypes () const
 
unsigned getDebugInfoOffset () const
 
void setDebugInfoOffset (unsigned DbgInfoOff)
 
bool hasContent () const
 
std::string getParentContextString (DIScope Context) const
 
void addGlobalName (StringRef Name, DIE *Die, DIScope Context)
 addGlobalName - Add a new global name to the compile unit. More...
 
void addGlobalType (DIType Ty)
 
void addPubTypes (DISubprogram SP)
 addPubTypes - Add a set of types from the subprogram to the global types. More...
 
void addAccelName (StringRef Name, DIE *Die)
 addAccelName - Add a new name to the name accelerator table. More...
 
void addAccelObjC (StringRef Name, DIE *Die)
 addAccelObjC - Add a new name to the ObjC accelerator table. More...
 
void addAccelNamespace (StringRef Name, DIE *Die)
 addAccelNamespace - Add a new name to the namespace accelerator table. More...
 
void addAccelType (StringRef Name, std::pair< DIE *, unsigned > Die)
 addAccelType - Add a new type to the type accelerator table. More...
 
DIEgetDIE (DIDescriptor D) const
 
DIEBlockgetDIEBlock ()
 
void insertDIE (DIDescriptor Desc, DIE *D)
 
void addDie (DIE *Buffer)
 
void addFlag (DIE *Die, dwarf::Attribute Attribute)
 addFlag - Add a flag that is true to the DIE. More...
 
void addUInt (DIE *Die, dwarf::Attribute Attribute, Optional< dwarf::Form > Form, uint64_t Integer)
 
void addUInt (DIEBlock *Block, dwarf::Form Form, uint64_t Integer)
 
void addSInt (DIE *Die, dwarf::Attribute Attribute, Optional< dwarf::Form > Form, int64_t Integer)
 
void addSInt (DIEBlock *Die, Optional< dwarf::Form > Form, int64_t Integer)
 
void addString (DIE *Die, dwarf::Attribute Attribute, const StringRef Str)
 
void addLocalString (DIE *Die, dwarf::Attribute Attribute, const StringRef Str)
 
void addExpr (DIEBlock *Die, dwarf::Form Form, const MCExpr *Expr)
 
void addLabel (DIE *Die, dwarf::Attribute Attribute, dwarf::Form Form, const MCSymbol *Label)
 
void addLabel (DIEBlock *Die, dwarf::Form Form, const MCSymbol *Label)
 
void addLabelAddress (DIE *Die, dwarf::Attribute Attribute, MCSymbol *Label)
 
void addOpAddress (DIEBlock *Die, const MCSymbol *Label)
 
void addDelta (DIE *Die, dwarf::Attribute Attribute, dwarf::Form Form, const MCSymbol *Hi, const MCSymbol *Lo)
 
void addDIEEntry (DIE *Die, dwarf::Attribute Attribute, DIE *Entry)
 
void addDIEEntry (DIE *Die, dwarf::Attribute Attribute, DIEEntry *Entry)
 
void addBlock (DIE *Die, dwarf::Attribute Attribute, DIEBlock *Block)
 
void addSourceLine (DIE *Die, DIVariable V)
 
void addSourceLine (DIE *Die, DIGlobalVariable G)
 
void addSourceLine (DIE *Die, DISubprogram SP)
 
void addSourceLine (DIE *Die, DIType Ty)
 
void addSourceLine (DIE *Die, DINameSpace NS)
 
void addSourceLine (DIE *Die, DIObjCProperty Ty)
 
void addAddress (DIE *Die, dwarf::Attribute Attribute, const MachineLocation &Location, bool Indirect=false)
 
void addConstantValue (DIE *Die, const MachineOperand &MO, DIType Ty)
 addConstantValue - Add constant value entry in variable DIE. More...
 
void addConstantValue (DIE *Die, const ConstantInt *CI, bool Unsigned)
 addConstantValue - Add constant value entry in variable DIE. More...
 
void addConstantValue (DIE *Die, const APInt &Val, bool Unsigned)
 
void addConstantFPValue (DIE *Die, const MachineOperand &MO)
 addConstantFPValue - Add constant value entry in variable DIE. More...
 
void addConstantFPValue (DIE *Die, const ConstantFP *CFP)
 addConstantFPValue - Add constant value entry in variable DIE. More...
 
void addTemplateParams (DIE &Buffer, DIArray TParams)
 addTemplateParams - Add template parameters in buffer. More...
 
void addRegisterOp (DIEBlock *TheDie, unsigned Reg)
 addRegisterOp - Add register operand. More...
 
void addRegisterOffset (DIEBlock *TheDie, unsigned Reg, int64_t Offset)
 addRegisterOffset - Add register offset. More...
 
void addComplexAddress (const DbgVariable &DV, DIE *Die, dwarf::Attribute Attribute, const MachineLocation &Location)
 
void addBlockByrefAddress (const DbgVariable &DV, DIE *Die, dwarf::Attribute Attribute, const MachineLocation &Location)
 
void addVariableAddress (const DbgVariable &DV, DIE *Die, MachineLocation Location)
 
void addType (DIE *Entity, DIType Ty, dwarf::Attribute Attribute=dwarf::DW_AT_type)
 addType - Add a new type attribute to the specified entity. More...
 
DIEgetOrCreateNameSpace (DINameSpace NS)
 getOrCreateNameSpace - Create a DIE for DINameSpace. More...
 
DIEgetOrCreateSubprogramDIE (DISubprogram SP)
 getOrCreateSubprogramDIE - Create new DIE using SP. More...
 
DIEgetOrCreateTypeDIE (const MDNode *N)
 
DIEgetOrCreateContextDIE (DIScope Context)
 getOrCreateContextDIE - Get context owner's DIE. More...
 
void createGlobalVariableDIE (DIGlobalVariable GV)
 createGlobalVariableDIE - create global variable DIE. More...
 
void constructContainingTypeDIEs ()
 
DIEconstructVariableDIE (DbgVariable &DV, bool isScopeAbstract)
 constructVariableDIE - Construct a DIE for the given DbgVariable. More...
 
DIEcreateAndAddDIE (unsigned Tag, DIE &Parent, DIDescriptor N=DIDescriptor())
 
unsigned getHeaderSize () const
 
void emitHeader (const MCSection *ASection, const MCSymbol *ASectionSym)
 Emit the header for this unit, not including the initial length field. More...
 

Detailed Description

CompileUnit - This dwarf writer support class manages information associated with a source file.

Definition at line 37 of file DwarfCompileUnit.h.

Constructor & Destructor Documentation

CompileUnit::CompileUnit ( unsigned  UID,
DIE D,
DICompileUnit  CU,
AsmPrinter A,
DwarfDebug DW,
DwarfUnits DWU 
)

CompileUnit - Compile unit constructor.

Definition at line 36 of file DwarfCompileUnit.cpp.

References insertDIE().

CompileUnit::~CompileUnit ( )

~CompileUnit - Destructor for compile unit.

Definition at line 45 of file DwarfCompileUnit.cpp.

Member Function Documentation

void CompileUnit::addAccelName ( StringRef  Name,
DIE Die 
)

addAccelName - Add a new name to the name accelerator table.

Definition at line 950 of file DwarfCompileUnit.cpp.

References llvm::DwarfUnits::getStringPoolEntry().

Referenced by addSubprogramNames(), and createGlobalVariableDIE().

void CompileUnit::addAccelNamespace ( StringRef  Name,
DIE Die 
)

addAccelNamespace - Add a new name to the namespace accelerator table.

Definition at line 962 of file DwarfCompileUnit.cpp.

References llvm::DwarfUnits::getStringPoolEntry().

Referenced by getOrCreateNameSpace().

void CompileUnit::addAccelObjC ( StringRef  Name,
DIE Die 
)

addAccelObjC - Add a new name to the ObjC accelerator table.

Definition at line 956 of file DwarfCompileUnit.cpp.

References llvm::DwarfUnits::getStringPoolEntry().

Referenced by addSubprogramNames().

void CompileUnit::addAccelType ( StringRef  Name,
std::pair< DIE *, unsigned Die 
)

addAccelType - Add a new type to the type accelerator table.

Definition at line 968 of file DwarfCompileUnit.cpp.

References llvm::DwarfUnits::getStringPoolEntry().

Referenced by getOrCreateTypeDIE().

void CompileUnit::addAddress ( DIE Die,
dwarf::Attribute  Attribute,
const MachineLocation Location,
bool  Indirect = false 
)

addAddress - Add an address attribute to a die based on the location provided.

Definition at line 469 of file DwarfCompileUnit.cpp.

References addBlock(), addRegisterOffset(), addRegisterOp(), addUInt(), llvm::dwarf::DW_OP_deref, llvm::MachineLocation::getOffset(), llvm::MachineLocation::getReg(), and llvm::MachineLocation::isReg().

Referenced by addVariableAddress().

void CompileUnit::addBlock ( DIE Die,
dwarf::Attribute  Attribute,
DIEBlock Block 
)
void CompileUnit::addBlockByrefAddress ( const DbgVariable DV,
DIE Die,
dwarf::Attribute  Attribute,
const MachineLocation Location 
)

addBlockByrefAddress - 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. Add the DWARF information to the die. Obsolete, please use addComplexAddress instead.

addBlockByrefAddress - 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. Add the DWARF information to the die. For more information, read large comment just above here.

Definition at line 584 of file DwarfCompileUnit.cpp.

References addBlock(), addRegisterOffset(), addRegisterOp(), addUInt(), llvm::dwarf::DW_OP_deref, llvm::dwarf::DW_OP_plus_uconst, llvm::DIArray::getElement(), llvm::DbgVariable::getName(), llvm::DIArray::getNumElements(), llvm::MachineLocation::getOffset(), llvm::DIType::getOffsetInBits(), llvm::MachineLocation::getReg(), llvm::DIDescriptor::getTag(), llvm::DbgVariable::getType(), llvm::DICompositeType::getTypeArray(), llvm::DIDerivedType::getTypeDerivedFrom(), llvm::MachineLocation::isReg(), and N.

Referenced by addVariableAddress().

void CompileUnit::addComplexAddress ( const DbgVariable DV,
DIE Die,
dwarf::Attribute  Attribute,
const MachineLocation Location 
)

addComplexAddress - Start with the address based on the location provided, and generate the DWARF information necessary to find the actual variable (navigating the extra location information encoded in the type) based on the starting location. Add the DWARF information to the die.

addComplexAddress - Start with the address based on the location provided, and generate the DWARF information necessary to find the actual variable given the extra address information encoded in the DIVariable, starting from the starting location. Add the DWARF information to the die.

Definition at line 491 of file DwarfCompileUnit.cpp.

References addBlock(), addRegisterOffset(), addRegisterOp(), addUInt(), llvm::dwarf::DW_OP_deref, llvm::dwarf::DW_OP_plus_uconst, llvm::DbgVariable::getAddrElement(), llvm::DbgVariable::getNumAddrElements(), llvm::MachineLocation::getOffset(), llvm::MachineLocation::getReg(), llvm::MachineLocation::isReg(), llvm_unreachable, N, llvm::DIBuilder::OpDeref, and llvm::DIBuilder::OpPlus.

Referenced by addVariableAddress().

void CompileUnit::addConstantFPValue ( DIE Die,
const MachineOperand MO 
)
void CompileUnit::addConstantFPValue ( DIE Die,
const ConstantFP CFP 
)

addConstantFPValue - Add constant value entry in variable DIE.

Definition at line 781 of file DwarfCompileUnit.cpp.

References addConstantValue(), llvm::APFloat::bitcastToAPInt(), and llvm::ConstantFP::getValueAPF().

void CompileUnit::addConstantValue ( DIE Die,
const MachineOperand MO,
DIType  Ty 
)

addConstantValue - Add constant value entry in variable DIE.

Definition at line 719 of file DwarfCompileUnit.cpp.

References addSInt(), addUInt(), llvm::MachineOperand::getImm(), llvm::MachineOperand::isImm(), and isTypeSigned().

Referenced by addConstantFPValue(), addConstantValue(), constructVariableDIE(), and createGlobalVariableDIE().

void CompileUnit::addConstantValue ( DIE Die,
const ConstantInt CI,
bool  Unsigned 
)

addConstantValue - Add constant value entry in variable DIE.

Definition at line 787 of file DwarfCompileUnit.cpp.

References addConstantValue(), llvm::ConstantInt::getValue(), and llvm::NVPTX::PTXLdStInstCode::Unsigned.

void CompileUnit::addConstantValue ( DIE Die,
const APInt Val,
bool  Unsigned 
)
void CompileUnit::addDelta ( DIE Die,
dwarf::Attribute  Attribute,
dwarf::Form  Form,
const MCSymbol Hi,
const MCSymbol Lo 
)

addDelta - Add a label delta attribute data and value.

Definition at line 269 of file DwarfCompileUnit.cpp.

References llvm::DIE::addValue().

void llvm::CompileUnit::addDie ( DIE Buffer)
inline

addDie - Adds or interns the DIE to the compile unit.

Definition at line 174 of file DwarfCompileUnit.h.

void CompileUnit::addDIEEntry ( DIE Die,
dwarf::Attribute  Attribute,
DIE Entry 
)

addDIEEntry - Add a DIE attribute data and value.

Definition at line 278 of file DwarfCompileUnit.cpp.

Referenced by addType(), constructContainingTypeDIEs(), constructVariableDIE(), createGlobalVariableDIE(), and getOrCreateSubprogramDIE().

void CompileUnit::addDIEEntry ( DIE Die,
dwarf::Attribute  Attribute,
DIEEntry Entry 
)

addDIEEntry - Add a DIE attribute data and value.

Definition at line 283 of file DwarfCompileUnit.cpp.

References llvm::DIE::addValue(), llvm::DIE::getCompileUnitOrNull(), getCUDie(), and llvm::DIEEntry::getEntry().

void CompileUnit::addExpr ( DIEBlock Die,
dwarf::Form  Form,
const MCExpr Expr 
)

addExpr - Add a Dwarf expression attribute data and value.

Definition at line 212 of file DwarfCompileUnit.cpp.

References llvm::DIE::addValue().

Referenced by createGlobalVariableDIE().

void CompileUnit::addFlag ( DIE Die,
dwarf::Attribute  Attribute 
)

addFlag - Add a flag that is true to the DIE.

addFlag - Add a flag that is true.

Definition at line 131 of file DwarfCompileUnit.cpp.

References llvm::DIE::addValue(), and llvm::DwarfDebug::getDwarfVersion().

Referenced by constructVariableDIE(), createGlobalVariableDIE(), llvm::DwarfDebug::endFunction(), and getOrCreateSubprogramDIE().

void CompileUnit::addGlobalName ( StringRef  Name,
DIE Die,
DIScope  Context 
)

addGlobalName - Add a new global name to the compile unit.

addGlobalName - Add a new global entity to the compile unit.

Definition at line 975 of file DwarfCompileUnit.cpp.

References getParentContextString(), and llvm::StringRef::str().

Referenced by createGlobalVariableDIE(), and getOrCreateNameSpace().

void CompileUnit::addGlobalType ( DIType  Ty)
void CompileUnit::addLabel ( DIE Die,
dwarf::Attribute  Attribute,
dwarf::Form  Form,
const MCSymbol Label 
)

addLabel - Add a Dwarf label attribute data and value.

Definition at line 219 of file DwarfCompileUnit.cpp.

References llvm::DIE::addValue().

Referenced by addLabel(), addOpAddress(), and constructVariableDIE().

void CompileUnit::addLabel ( DIEBlock Die,
dwarf::Form  Form,
const MCSymbol Label 
)

Definition at line 225 of file DwarfCompileUnit.cpp.

References addLabel().

void CompileUnit::addLabelAddress ( DIE Die,
dwarf::Attribute  Attribute,
MCSymbol Label 
)

addLabelAddress - Add a dwarf label attribute data and value using either DW_FORM_addr or DW_FORM_GNU_addr_index.

addLabelAddress - Add a dwarf label attribute data and value using DW_FORM_addr or DW_FORM_GNU_addr_index.

Definition at line 233 of file DwarfCompileUnit.cpp.

References llvm::DwarfDebug::addArangeLabel(), llvm::DIE::addValue(), llvm::DwarfUnits::getAddrPoolIndex(), and llvm::DwarfDebug::useSplitDwarf().

void CompileUnit::addLocalString ( DIE Die,
dwarf::Attribute  Attribute,
const StringRef  Str 
)

addLocalString - Add a string attribute data and value.

addLocalString - Add a string attribute data and value. This is guaranteed to be in the local string pool instead of indirected.

Definition at line 197 of file DwarfCompileUnit.cpp.

References llvm::DIE::addValue(), llvm::DwarfUnits::getStringPoolEntry(), llvm::DwarfUnits::getStringPoolSym(), and llvm::AsmPrinter::needsRelocationsForDwarfStringPool().

void CompileUnit::addOpAddress ( DIEBlock Die,
const MCSymbol Sym 
)

addOpAddress - 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.

Definition at line 256 of file DwarfCompileUnit.cpp.

References llvm::DwarfDebug::addArangeLabel(), addLabel(), addUInt(), llvm::dwarf::DW_OP_addr, llvm::dwarf::DW_OP_GNU_addr_index, llvm::DwarfUnits::getAddrPoolIndex(), and llvm::DwarfDebug::useSplitDwarf().

Referenced by createGlobalVariableDIE().

void CompileUnit::addPubTypes ( DISubprogram  SP)

addPubTypes - Add a set of types from the subprogram to the global types.

addPubTypes - Add subprogram argument types for pubtypes section.

Definition at line 1035 of file DwarfCompileUnit.cpp.

References addGlobalType(), llvm::DIArray::getElement(), llvm::DIArray::getNumElements(), llvm::DIDescriptor::getTag(), llvm::DISubprogram::getType(), and llvm::DICompositeType::getTypeArray().

void CompileUnit::addRegisterOffset ( DIEBlock TheDie,
unsigned  Reg,
int64_t  Offset 
)
void CompileUnit::addRegisterOp ( DIEBlock TheDie,
unsigned  Reg 
)
void CompileUnit::addSInt ( DIE Die,
dwarf::Attribute  Attribute,
Optional< dwarf::Form >  Form,
int64_t  Integer 
)

addSInt - Add an signed integer attribute data and value.

Definition at line 155 of file DwarfCompileUnit.cpp.

References llvm::DIE::addValue(), and llvm::DIEInteger::BestForm().

Referenced by addConstantValue(), addRegisterOffset(), and addSInt().

void CompileUnit::addSInt ( DIEBlock Die,
Optional< dwarf::Form >  Form,
int64_t  Integer 
)

Definition at line 163 of file DwarfCompileUnit.cpp.

References addSInt().

void CompileUnit::addSourceLine ( DIE Die,
DIVariable  V 
)
void CompileUnit::addSourceLine ( DIE Die,
DIGlobalVariable  G 
)
void CompileUnit::addSourceLine ( DIE Die,
DISubprogram  SP 
)
void CompileUnit::addSourceLine ( DIE Die,
DIType  Ty 
)

addSourceLine - Add location information to specified debug information entry.

Definition at line 372 of file DwarfCompileUnit.cpp.

References addUInt(), llvm::DIScope::getDirectory(), llvm::DIScope::getFilename(), llvm::DIType::getLineNumber(), llvm::DwarfDebug::getOrCreateSourceID(), getUniqueID(), llvm::DIDescriptor::isType(), and llvm::None.

void CompileUnit::addSourceLine ( DIE Die,
DINameSpace  NS 
)
void CompileUnit::addSourceLine ( DIE Die,
DIObjCProperty  Ty 
)
void CompileUnit::addString ( DIE Die,
dwarf::Attribute  Attribute,
const StringRef  Str 
)

addString - Add a string attribute data and value.

addString - Add a string attribute data and value. We always emit a reference to the string pool instead of immediate strings so that DIEs have more predictable sizes. In the case of split dwarf we emit an index into another table which gets us the static offset into the string table.

Definition at line 173 of file DwarfCompileUnit.cpp.

References llvm::DIE::addValue(), llvm::DwarfUnits::getStringPoolEntry(), llvm::DwarfUnits::getStringPoolIndex(), llvm::DwarfUnits::getStringPoolSym(), llvm::AsmPrinter::needsRelocationsForDwarfStringPool(), and llvm::DwarfDebug::useSplitDwarf().

Referenced by constructVariableDIE(), createGlobalVariableDIE(), getOrCreateNameSpace(), and getOrCreateSubprogramDIE().

void CompileUnit::addTemplateParams ( DIE Buffer,
DIArray  TParams 
)

addTemplateParams - Add template parameters in buffer.

addTemplateParams - Add template parameters into buffer.

Definition at line 849 of file DwarfCompileUnit.cpp.

References llvm::DIArray::getElement(), llvm::DIArray::getNumElements(), llvm::DIDescriptor::isTemplateTypeParameter(), and llvm::DIDescriptor::isTemplateValueParameter().

Referenced by getOrCreateSubprogramDIE().

void CompileUnit::addType ( DIE Entity,
DIType  Ty,
dwarf::Attribute  Attribute = dwarf::DW_AT_type 
)

addType - Add a new type attribute to the specified entity.

addType - Add a new type attribute to the specified entity. This takes and attribute parameter because DW_AT_friend attributes are also type references.

Definition at line 922 of file DwarfCompileUnit.cpp.

References addDIEEntry(), addGlobalType(), and getOrCreateTypeDIE().

Referenced by constructVariableDIE(), createGlobalVariableDIE(), and getOrCreateSubprogramDIE().

void CompileUnit::addUInt ( DIE Die,
dwarf::Attribute  Attribute,
Optional< dwarf::Form >  Form,
uint64_t  Integer 
)
void CompileUnit::addUInt ( DIEBlock Block,
dwarf::Form  Form,
uint64_t  Integer 
)

Definition at line 149 of file DwarfCompileUnit.cpp.

References addUInt().

void CompileUnit::addVariableAddress ( const DbgVariable DV,
DIE Die,
MachineLocation  Location 
)
void CompileUnit::constructContainingTypeDIEs ( )

constructContainingTypeDIEs - Construct DIEs for types that contain vtables.

Definition at line 1727 of file DwarfCompileUnit.cpp.

References addDIEEntry(), and getDIE().

DIE * CompileUnit::constructVariableDIE ( DbgVariable DV,
bool  isScopeAbstract 
)
DIE * CompileUnit::createAndAddDIE ( unsigned  Tag,
DIE Parent,
DIDescriptor  N = DIDescriptor() 
)

Create a DIE with the given Tag, add the DIE to its parent, and call insertDIE if MD is not null.

Definition at line 299 of file DwarfCompileUnit.cpp.

References llvm::DIE::addChild(), and insertDIE().

Referenced by createGlobalVariableDIE(), getOrCreateNameSpace(), getOrCreateSubprogramDIE(), and getOrCreateTypeDIE().

void CompileUnit::createGlobalVariableDIE ( DIGlobalVariable  GV)

createGlobalVariableDIE - create global variable DIE.

Definition at line 1509 of file DwarfCompileUnit.cpp.

References addAccelName(), addBlock(), addConstantValue(), addDIEEntry(), addExpr(), addFlag(), addGlobalName(), addOpAddress(), addSourceLine(), addString(), addType(), addUInt(), createAndAddDIE(), llvm::dwarf::DW_OP_const4u, llvm::dwarf::DW_OP_const8u, llvm::dwarf::DW_OP_constu, llvm::dwarf::DW_OP_GNU_const_index, llvm::dwarf::DW_OP_GNU_push_tls_address, llvm::dwarf::DW_OP_plus, llvm::StringRef::empty(), llvm::DwarfUnits::getAddrPoolIndex(), llvm::DIGlobalVariable::getConstant(), llvm::DIGlobalVariable::getContext(), llvm::AsmPrinter::getDataLayout(), llvm::TargetLoweringObjectFile::getDebugThreadLocalSymbol(), getDIE(), llvm::DIGlobalVariable::getDisplayName(), llvm::DIGlobalVariable::getGlobal(), llvm::DataLayout::getIndexedOffset(), llvm::DIGlobalVariable::getLinkageName(), getMergedGlobalExpr(), llvm::DIGlobalVariable::getName(), llvm::AsmPrinter::getObjFileLowering(), getOrCreateContextDIE(), llvm::DataLayout::getPointerSize(), llvm::GlobalValue::getRealLinkageName(), llvm::DIGlobalVariable::getStaticDataMemberDeclaration(), llvm::AsmPrinter::getSymbol(), llvm::DIDescriptor::getTag(), llvm::Value::getType(), llvm::DIGlobalVariable::getType(), llvm::DIDescriptor::isCompileUnit(), llvm::DIGlobalVariable::isDefinition(), llvm::DIDescriptor::isFile(), llvm::DIDescriptor::isGlobalVariable(), llvm::DIGlobalVariable::isLocalToUnit(), llvm::DIType::isStaticMember(), llvm::DwarfDebug::isSubprogramContext(), llvm::GlobalVariable::isThreadLocal(), isUnsignedDIType(), llvm::DwarfDebug::useSplitDwarf(), and llvm::DIDerivedType::Verify().

void CompileUnit::emitHeader ( const MCSection ASection,
const MCSymbol ASectionSym 
)
const StringMap<std::vector<DIE *> >& llvm::CompileUnit::getAccelNames ( ) const
inline

Definition at line 109 of file DwarfCompileUnit.h.

const StringMap<std::vector<DIE *> >& llvm::CompileUnit::getAccelNamespace ( ) const
inline

Definition at line 115 of file DwarfCompileUnit.h.

const StringMap<std::vector<DIE *> >& llvm::CompileUnit::getAccelObjC ( ) const
inline

Definition at line 112 of file DwarfCompileUnit.h.

const StringMap<std::vector<std::pair<DIE *, unsigned> > >& llvm::CompileUnit::getAccelTypes ( ) const
inline

Definition at line 119 of file DwarfCompileUnit.h.

DIE* llvm::CompileUnit::getCUDie ( ) const
inline
unsigned llvm::CompileUnit::getDebugInfoOffset ( ) const
inline

Definition at line 123 of file DwarfCompileUnit.h.

Referenced by llvm::DwarfDebug::emitDIE().

DIE * CompileUnit::getDIE ( DIDescriptor  D) const

getDIE - Returns the debug information entry map slot for the specified debug variable. We delegate the request to DwarfDebug when the MDNode can be part of the type system, since DIEs for the type system can be shared across CUs and the mappings are kept in DwarfDebug.

getDIE - Returns the debug information entry map slot for the specified debug variable. We delegate the request to DwarfDebug when the DIE for this MDNode can be shared across CUs. The mappings will be kept in DwarfDebug for shareable DIEs.

Definition at line 113 of file DwarfCompileUnit.cpp.

References llvm::DwarfDebug::getDIE(), and isShareableAcrossCUs().

Referenced by constructContainingTypeDIEs(), createGlobalVariableDIE(), getOrCreateContextDIE(), getOrCreateNameSpace(), getOrCreateSubprogramDIE(), and getOrCreateTypeDIE().

DIEBlock* llvm::CompileUnit::getDIEBlock ( )
inline

Definition at line 164 of file DwarfCompileUnit.h.

Referenced by getOrCreateSubprogramDIE().

const StringMap<DIE *>& llvm::CompileUnit::getGlobalNames ( ) const
inline

Definition at line 106 of file DwarfCompileUnit.h.

const StringMap<DIE *>& llvm::CompileUnit::getGlobalTypes ( ) const
inline

Definition at line 107 of file DwarfCompileUnit.h.

unsigned llvm::CompileUnit::getHeaderSize ( ) const
inline

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

Definition at line 328 of file DwarfCompileUnit.h.

Referenced by llvm::DwarfUnits::emitUnits().

uint16_t llvm::CompileUnit::getLanguage ( ) const
inline
DICompileUnit llvm::CompileUnit::getNode ( ) const
inline

Definition at line 104 of file DwarfCompileUnit.h.

DIE * CompileUnit::getOrCreateContextDIE ( DIScope  Context)
DIE * CompileUnit::getOrCreateNameSpace ( DINameSpace  NS)
DIE * CompileUnit::getOrCreateSubprogramDIE ( DISubprogram  SP)
DIE * CompileUnit::getOrCreateTypeDIE ( const MDNode TyNode)
std::string CompileUnit::getParentContextString ( DIScope  Context) const

getParentContextString - Get a string containing the language specific context for a global name.

getParentContextString - Walks the metadata parent chain in a language specific manner (using the compile unit language) and returns it as a string. This is done at the metadata level because DIEs may not currently have been added to the parent context and walking the DIEs looking for names is more expensive than walking the metadata.

Definition at line 999 of file DwarfCompileUnit.cpp.

References llvm::dwarf::DW_LANG_C_plus_plus, llvm::StringRef::empty(), llvm::DIScope::getContext(), getLanguage(), llvm::DIScope::getName(), I, llvm::DIDescriptor::isCompileUnit(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SmallVectorTemplateCommon< T >::rbegin(), and llvm::SmallVectorTemplateCommon< T >::rend().

Referenced by addGlobalName(), and addGlobalType().

unsigned llvm::CompileUnit::getUniqueID ( ) const
inline
bool llvm::CompileUnit::hasContent ( ) const
inline

hasContent - Return true if this compile unit has something to write out.

Definition at line 128 of file DwarfCompileUnit.h.

void CompileUnit::insertDIE ( DIDescriptor  Desc,
DIE D 
)

insertDIE - Insert DIE into the map. We delegate the request to DwarfDebug when the MDNode can be part of the type system, since DIEs for the type system can be shared across CUs and the mappings are kept in DwarfDebug.

insertDIE - Insert DIE into the map. We delegate the request to DwarfDebug when the DIE for this MDNode can be shared across CUs. The mappings will be kept in DwarfDebug for shareable DIEs.

Definition at line 122 of file DwarfCompileUnit.cpp.

References llvm::DwarfDebug::insertDIE(), and isShareableAcrossCUs().

Referenced by CompileUnit(), and createAndAddDIE().

void llvm::CompileUnit::setDebugInfoOffset ( unsigned  DbgInfoOff)
inline

Definition at line 124 of file DwarfCompileUnit.h.


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