class DwarfUnit

Declaration

class DwarfUnit : public DIEUnit { /* full declaration omitted */ };

Description

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

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:40

Inherits from: DIEUnit

Member Variables

protected const llvm::DICompileUnit* CUNode
MDNode for the compile unit.
protected llvm::BumpPtrAllocator DIEValueAllocator
protected llvm::AsmPrinter* Asm
Target of Dwarf emission.
protected llvm::MCSymbol* EndLabel = nullptr
Emitted at the end of the CU and used to compute the CU Length field.
protected llvm::DwarfDebug* DD
protected llvm::DwarfFile* DU
protected llvm::DIE* IndexTyDie
An anonymous type for index type. Owned by DIEUnit.
protected DenseMap<const llvm::MDNode*, llvm::DIE*> MDNodeToDieMap
Tracks the mapping of unit level debug information variables to debug information entries.
protected std::vector<DIEBlock*> DIEBlocks
A list of all the DIEBlocks in use.
protected std::vector<DIELoc*> DIELocs
A list of all the DIELocs in use.
protected DenseMap<llvm::DIE*, const llvm::DINode*> ContainingTypeMap
This map is used to keep track of subprogram DIEs that need DW_AT_containing_type attribute. This attribute points to a DIE that corresponds to the MDNode mapped with the subprogram DIE.

Method Overview

  • protected DwarfUnit(dwarf::Tag, const llvm::DICompileUnit * Node, llvm::AsmPrinter * A, llvm::DwarfDebug * DW, llvm::DwarfFile * DWU)
  • public void addBlock(llvm::DIE & Die, dwarf::Attribute Attribute, llvm::DIEBlock * Block)
  • public void addBlock(llvm::DIE & Die, dwarf::Attribute Attribute, llvm::DIELoc * Loc)
  • public void addConstantFPValue(llvm::DIE & Die, const llvm::MachineOperand & MO)
  • public void addConstantFPValue(llvm::DIE & Die, const llvm::ConstantFP * CFP)
  • public void addConstantValue(llvm::DIE & Die, const llvm::APInt & Val, bool Unsigned)
  • public void addConstantValue(llvm::DIE & Die, const llvm::APInt & Val, const llvm::DIType * Ty)
  • public void addConstantValue(llvm::DIE & Die, const llvm::ConstantInt * CI, const llvm::DIType * Ty)
  • public void addConstantValue(llvm::DIE & Die, const llvm::MachineOperand & MO, const llvm::DIType * Ty)
  • public void addConstantValue(llvm::DIE & Die, uint64_t Val, const llvm::DIType * Ty)
  • public void addConstantValue(llvm::DIE & Die, bool Unsigned, uint64_t Val)
  • public void addDIEEntry(llvm::DIE & Die, dwarf::Attribute Attribute, llvm::DIEEntry Entry)
  • public void addDIEEntry(llvm::DIE & Die, dwarf::Attribute Attribute, llvm::DIE & Entry)
  • public void addDIETypeSignature(llvm::DIE & Die, uint64_t Signature)
  • public void addFlag(llvm::DIE & Die, dwarf::Attribute Attribute)
  • public virtual void addGlobalName(llvm::StringRef Name, const llvm::DIE & Die, const llvm::DIScope * Context)
  • public virtual void addGlobalType(const llvm::DIType * Ty, const llvm::DIE & Die, const llvm::DIScope * Context)
  • public void addLabel(llvm::DIELoc & Die, dwarf::Form Form, const llvm::MCSymbol * Label)
  • public DIEValueList::value_iterator addLabel(llvm::DIEValueList & Die, dwarf::Attribute Attribute, dwarf::Form Form, const llvm::MCSymbol * Label)
  • public void addLabelDelta(llvm::DIE & Die, dwarf::Attribute Attribute, const llvm::MCSymbol * Hi, const llvm::MCSymbol * Lo)
  • public void addLinkageName(llvm::DIE & Die, llvm::StringRef LinkageName)
  • public void addOpAddress(llvm::DIELoc & Die, const llvm::MCSymbol * Sym)
  • public void addRnglistsBase()
  • public void addSInt(llvm::DIELoc & Die, Optional<dwarf::Form> Form, int64_t Integer)
  • public void addSInt(llvm::DIEValueList & Die, dwarf::Attribute Attribute, Optional<dwarf::Form> Form, int64_t Integer)
  • public DIE::value_iterator addSectionDelta(llvm::DIE & Die, dwarf::Attribute Attribute, const llvm::MCSymbol * Hi, const llvm::MCSymbol * Lo)
  • public DIE::value_iterator addSectionLabel(llvm::DIE & Die, dwarf::Attribute Attribute, const llvm::MCSymbol * Label, const llvm::MCSymbol * Sec)
  • public void addSectionOffset(llvm::DIE & Die, dwarf::Attribute Attribute, uint64_t Integer)
  • public void addSourceLine(llvm::DIE & Die, const llvm::DISubprogram * SP)
  • public void addSourceLine(llvm::DIE & Die, const llvm::DIGlobalVariable * G)
  • public void addSourceLine(llvm::DIE & Die, const llvm::DILocalVariable * V)
  • public void addSourceLine(llvm::DIE & Die, unsigned int Line, const llvm::DIFile * File)
  • public void addSourceLine(llvm::DIE & Die, const llvm::DILabel * L)
  • public void addSourceLine(llvm::DIE & Die, const llvm::DIType * Ty)
  • public void addSourceLine(llvm::DIE & Die, const llvm::DIObjCProperty * Ty)
  • public void addString(llvm::DIE & Die, dwarf::Attribute Attribute, llvm::StringRef Str)
  • public void addStringOffsetsStart()
  • public void addTemplateParams(llvm::DIE & Buffer, llvm::DINodeArray TParams)
  • public void addThrownTypes(llvm::DIE & Die, llvm::DINodeArray ThrownTypes)
  • public void addType(llvm::DIE & Entity, const llvm::DIType * Ty, dwarf::Attribute Attribute = dwarf::DW_AT_type)
  • public void addUInt(llvm::DIEValueList & Die, dwarf::Attribute Attribute, Optional<dwarf::Form> Form, uint64_t Integer)
  • public void addUInt(llvm::DIEValueList & Block, dwarf::Form Form, uint64_t Integer)
  • public void applySubprogramAttributes(const llvm::DISubprogram * SP, llvm::DIE & SPDie, bool SkipSPAttributes = false)
  • protected bool applySubprogramDefinitionAttributes(const llvm::DISubprogram * SP, llvm::DIE & SPDie)
  • public void constructContainingTypeDIEs()
  • public void constructSubprogramArguments(llvm::DIE & Buffer, llvm::DITypeRefArray Args)
  • public void constructTypeDIE(llvm::DIE & Buffer, const llvm::DICompositeType * CTy)
  • public llvm::DIE & createAndAddDIE(unsigned int Tag, llvm::DIE & Parent, const llvm::DINode * N = nullptr)
  • public llvm::DIE * createTypeDIE(const llvm::DICompositeType * Ty)
  • public llvm::DIE * createTypeDIE(const llvm::DIScope * Context, llvm::DIE & ContextDIE, const llvm::DIType * Ty)
  • protected void emitCommonHeader(bool UseOffsets, dwarf::UnitType UT)
  • public virtual void emitHeader(bool UseOffsets)
  • public llvm::AsmPrinter * getAsmPrinter() const
  • public virtual llvm::DwarfCompileUnit & getCU()
  • public const llvm::DICompileUnit * getCUNode() const
  • public llvm::DIE * getDIE(const llvm::DINode * D) const
  • public llvm::DIELoc * getDIELoc()
  • public uint16_t getDwarfVersion() const
  • public llvm::MCSymbol * getEndLabel() const
  • public virtual unsigned int getHeaderSize() const
  • public uint16_t getLanguage() const
  • public Optional<MD5::MD5Result> getMD5AsBytes(const llvm::DIFile * File) const
  • public llvm::DIE * getOrCreateContextDIE(const llvm::DIScope * Context)
  • public llvm::DIE * getOrCreateModule(const llvm::DIModule * M)
  • public llvm::DIE * getOrCreateNameSpace(const llvm::DINamespace * NS)
  • protected virtual unsigned int getOrCreateSourceID(const llvm::DIFile * File)
  • protected llvm::DIE * getOrCreateStaticMemberDIE(const llvm::DIDerivedType * DT)
  • public llvm::DIE * getOrCreateSubprogramDIE(const llvm::DISubprogram * SP, bool Minimal = false)
  • public llvm::DIE * getOrCreateTypeDIE(const llvm::MDNode * TyNode)
  • public std::string getParentContextString(const llvm::DIScope * Context) const
  • public bool hasContent() const
  • public void insertDIE(const llvm::DINode * Desc, llvm::DIE * D)
  • public void insertDIE(llvm::DIE * D)
  • protected bool isShareableAcrossCUs(const llvm::DINode * D) const
  • protected bool shareAcrossDWOCUs() const
  • public bool useSegmentedStringOffsetsTable() const
  • protected ~DwarfUnit()

Inherited from DIEUnit:

Methods

DwarfUnit(dwarf::Tag,
          const llvm::DICompileUnit* Node,
          llvm::AsmPrinter* A,
          llvm::DwarfDebug* DW,
          llvm::DwarfFile* DWU)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:76

Parameters

dwarf::Tag
const llvm::DICompileUnit* Node
llvm::AsmPrinter* A
llvm::DwarfDebug* DW
llvm::DwarfFile* DWU

void addBlock(llvm::DIE& Die,
              dwarf::Attribute Attribute,
              llvm::DIEBlock* Block)

Description

Add block data.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:187

Parameters

llvm::DIE& Die
dwarf::Attribute Attribute
llvm::DIEBlock* Block

void addBlock(llvm::DIE& Die,
              dwarf::Attribute Attribute,
              llvm::DIELoc* Loc)

Description

Add block data.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:184

Parameters

llvm::DIE& Die
dwarf::Attribute Attribute
llvm::DIELoc* Loc

void addConstantFPValue(
    llvm::DIE& Die,
    const llvm::MachineOperand& MO)

Description

Add constant value entry in variable DIE.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:207

Parameters

llvm::DIE& Die
const llvm::MachineOperand& MO

void addConstantFPValue(
    llvm::DIE& Die,
    const llvm::ConstantFP* CFP)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:208

Parameters

llvm::DIE& Die
const llvm::ConstantFP* CFP

void addConstantValue(llvm::DIE& Die,
                      const llvm::APInt& Val,
                      bool Unsigned)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:202

Parameters

llvm::DIE& Die
const llvm::APInt& Val
bool Unsigned

void addConstantValue(llvm::DIE& Die,
                      const llvm::APInt& Val,
                      const llvm::DIType* Ty)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:201

Parameters

llvm::DIE& Die
const llvm::APInt& Val
const llvm::DIType* Ty

void addConstantValue(llvm::DIE& Die,
                      const llvm::ConstantInt* CI,
                      const llvm::DIType* Ty)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:200

Parameters

llvm::DIE& Die
const llvm::ConstantInt* CI
const llvm::DIType* Ty

void addConstantValue(
    llvm::DIE& Die,
    const llvm::MachineOperand& MO,
    const llvm::DIType* Ty)

Description

Add constant value entry in variable DIE.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:199

Parameters

llvm::DIE& Die
const llvm::MachineOperand& MO
const llvm::DIType* Ty

void addConstantValue(llvm::DIE& Die,
                      uint64_t Val,
                      const llvm::DIType* Ty)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:203

Parameters

llvm::DIE& Die
uint64_t Val
const llvm::DIType* Ty

void addConstantValue(llvm::DIE& Die,
                      bool Unsigned,
                      uint64_t Val)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:204

Parameters

llvm::DIE& Die
bool Unsigned
uint64_t Val

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

Description

Add a DIE attribute data and value.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:178

Parameters

llvm::DIE& Die
dwarf::Attribute Attribute
llvm::DIEEntry Entry

void addDIEEntry(llvm::DIE& Die,
                 dwarf::Attribute Attribute,
                 llvm::DIE& Entry)

Description

Add a DIE attribute data and value.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:175

Parameters

llvm::DIE& Die
dwarf::Attribute Attribute
llvm::DIE& Entry

void addDIETypeSignature(llvm::DIE& Die,
                         uint64_t Signature)

Description

Add a type's DW_AT_signature and set the declaration flag.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:181

Parameters

llvm::DIE& Die
uint64_t Signature

void addFlag(llvm::DIE& Die,
             dwarf::Attribute Attribute)

Description

Add a flag that is true to the DIE.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:133

Parameters

llvm::DIE& Die
dwarf::Attribute Attribute

virtual void addGlobalName(
    llvm::StringRef Name,
    const llvm::DIE& Die,
    const llvm::DIScope* Context)

Description

Add a new global name to the compile unit.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:106

Parameters

llvm::StringRef Name
const llvm::DIE& Die
const llvm::DIScope* Context

virtual void addGlobalType(
    const llvm::DIType* Ty,
    const llvm::DIE& Die,
    const llvm::DIScope* Context)

Description

Add a new global type to the compile unit.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:110

Parameters

const llvm::DIType* Ty
const llvm::DIE& Die
const llvm::DIScope* Context

void addLabel(llvm::DIELoc& Die,
              dwarf::Form Form,
              const llvm::MCSymbol* Label)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:161

Parameters

llvm::DIELoc& Die
dwarf::Form Form
const llvm::MCSymbol* Label

DIEValueList::value_iterator addLabel(
    llvm::DIEValueList& Die,
    dwarf::Attribute Attribute,
    dwarf::Form Form,
    const llvm::MCSymbol* Label)

Description

Add a Dwarf label attribute data and value.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:156

Parameters

llvm::DIEValueList& Die
dwarf::Attribute Attribute
dwarf::Form Form
const llvm::MCSymbol* Label

void addLabelDelta(llvm::DIE& Die,
                   dwarf::Attribute Attribute,
                   const llvm::MCSymbol* Hi,
                   const llvm::MCSymbol* Lo)

Description

Add a label delta attribute data and value.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:171

Parameters

llvm::DIE& Die
dwarf::Attribute Attribute
const llvm::MCSymbol* Hi
const llvm::MCSymbol* Lo

void addLinkageName(llvm::DIE& Die,
                    llvm::StringRef LinkageName)

Description

Add a linkage name, if it isn't empty.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:211

Parameters

llvm::DIE& Die
llvm::StringRef LinkageName

void addOpAddress(llvm::DIELoc& Die,
                  const llvm::MCSymbol* Sym)

Description

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.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:168

Parameters

llvm::DIELoc& Die
const llvm::MCSymbol* Sym

void addRnglistsBase()

Description

Add the DW_AT_rnglists_base attribute to the unit DIE.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:273

void addSInt(llvm::DIELoc& Die,
             Optional<dwarf::Form> Form,
             int64_t Integer)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:145

Parameters

llvm::DIELoc& Die
Optional<dwarf::Form> Form
int64_t Integer

void addSInt(llvm::DIEValueList& Die,
             dwarf::Attribute Attribute,
             Optional<dwarf::Form> Form,
             int64_t Integer)

Description

Add an signed integer attribute data and value.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:142

Parameters

llvm::DIEValueList& Die
dwarf::Attribute Attribute
Optional<dwarf::Form> Form
int64_t Integer

DIE::value_iterator addSectionDelta(
    llvm::DIE& Die,
    dwarf::Attribute Attribute,
    const llvm::MCSymbol* Hi,
    const llvm::MCSymbol* Lo)

Description

addSectionDelta - Add a label delta attribute data and value.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:280

Parameters

llvm::DIE& Die
dwarf::Attribute Attribute
const llvm::MCSymbol* Hi
const llvm::MCSymbol* Lo

DIE::value_iterator addSectionLabel(
    llvm::DIE& Die,
    dwarf::Attribute Attribute,
    const llvm::MCSymbol* Label,
    const llvm::MCSymbol* Sec)

Description

Add a Dwarf section label attribute data and value.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:284

Parameters

llvm::DIE& Die
dwarf::Attribute Attribute
const llvm::MCSymbol* Label
const llvm::MCSymbol* Sec

void addSectionOffset(llvm::DIE& Die,
                      dwarf::Attribute Attribute,
                      uint64_t Integer)

Description

Add an offset into a section attribute data and value.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:164

Parameters

llvm::DIE& Die
dwarf::Attribute Attribute
uint64_t Integer

void addSourceLine(llvm::DIE& Die,
                   const llvm::DISubprogram* SP)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:193

Parameters

llvm::DIE& Die
const llvm::DISubprogram* SP

void addSourceLine(
    llvm::DIE& Die,
    const llvm::DIGlobalVariable* G)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:192

Parameters

llvm::DIE& Die
const llvm::DIGlobalVariable* G

void addSourceLine(llvm::DIE& Die,
                   const llvm::DILocalVariable* V)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:191

Parameters

llvm::DIE& Die
const llvm::DILocalVariable* V

void addSourceLine(llvm::DIE& Die,
                   unsigned int Line,
                   const llvm::DIFile* File)

Description

Add location information to specified debug information entry.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:190

Parameters

llvm::DIE& Die
unsigned int Line
const llvm::DIFile* File

void addSourceLine(llvm::DIE& Die,
                   const llvm::DILabel* L)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:194

Parameters

llvm::DIE& Die
const llvm::DILabel* L

void addSourceLine(llvm::DIE& Die,
                   const llvm::DIType* Ty)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:195

Parameters

llvm::DIE& Die
const llvm::DIType* Ty

void addSourceLine(llvm::DIE& Die,
                   const llvm::DIObjCProperty* Ty)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:196

Parameters

llvm::DIE& Die
const llvm::DIObjCProperty* Ty

void addString(llvm::DIE& Die,
               dwarf::Attribute Attribute,
               llvm::StringRef Str)

Description

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.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:153

Parameters

llvm::DIE& Die
dwarf::Attribute Attribute
llvm::StringRef Str

void addStringOffsetsStart()

Description

Add the DW_AT_str_offsets_base attribute to the unit DIE.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:270

void addTemplateParams(llvm::DIE& Buffer,
                       llvm::DINodeArray TParams)

Description

Add template parameters in buffer.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:214

Parameters

llvm::DIE& Buffer
llvm::DINodeArray TParams

void addThrownTypes(llvm::DIE& Die,
                    llvm::DINodeArray ThrownTypes)

Description

Add thrown types.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:217

Parameters

llvm::DIE& Die
llvm::DINodeArray ThrownTypes

void addType(llvm::DIE& Entity,
             const llvm::DIType* Ty,
             dwarf::Attribute Attribute =
                 dwarf::DW_AT_type)

Description

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

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:223

Parameters

llvm::DIE& Entity
const llvm::DIType* Ty
dwarf::Attribute Attribute = dwarf::DW_AT_type

void addUInt(llvm::DIEValueList& Die,
             dwarf::Attribute Attribute,
             Optional<dwarf::Form> Form,
             uint64_t Integer)

Description

Add an unsigned integer attribute data and value.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:136

Parameters

llvm::DIEValueList& Die
dwarf::Attribute Attribute
Optional<dwarf::Form> Form
uint64_t Integer

void addUInt(llvm::DIEValueList& Block,
             dwarf::Form Form,
             uint64_t Integer)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:139

Parameters

llvm::DIEValueList& Block
dwarf::Form Form
uint64_t Integer

void applySubprogramAttributes(
    const llvm::DISubprogram* SP,
    llvm::DIE& SPDie,
    bool SkipSPAttributes = false)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:230

Parameters

const llvm::DISubprogram* SP
llvm::DIE& SPDie
bool SkipSPAttributes = false

bool applySubprogramDefinitionAttributes(
    const llvm::DISubprogram* SP,
    llvm::DIE& SPDie)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:79

Parameters

const llvm::DISubprogram* SP
llvm::DIE& SPDie

void constructContainingTypeDIEs()

Description

Construct DIEs for types that contain vtables.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:243

void constructSubprogramArguments(
    llvm::DIE& Buffer,
    llvm::DITypeRefArray Args)

Description

Construct function argument DIEs.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:246

Parameters

llvm::DIE& Buffer
llvm::DITypeRefArray Args

void constructTypeDIE(
    llvm::DIE& Buffer,
    const llvm::DICompositeType* CTy)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:277

Parameters

llvm::DIE& Buffer
const llvm::DICompositeType* CTy

llvm::DIE& createAndAddDIE(
    unsigned int Tag,
    llvm::DIE& Parent,
    const llvm::DINode* N = nullptr)

Description

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

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:250

Parameters

unsigned int Tag
llvm::DIE& Parent
const llvm::DINode* N = nullptr

llvm::DIE* createTypeDIE(
    const llvm::DICompositeType* Ty)

Description

Get context owner's DIE.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:293

Parameters

const llvm::DICompositeType* Ty

llvm::DIE* createTypeDIE(
    const llvm::DIScope* Context,
    llvm::DIE& ContextDIE,
    const llvm::DIType* Ty)

Description

Creates type DIE with specific context.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:234

Parameters

const llvm::DIScope* Context
llvm::DIE& ContextDIE
const llvm::DIType* Ty

void emitCommonHeader(bool UseOffsets,
                      dwarf::UnitType UT)

Description

Emit the common part of the header for this unit.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:306

Parameters

bool UseOffsets
dwarf::UnitType UT

virtual void emitHeader(bool UseOffsets)

Description

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

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:267

Parameters

bool UseOffsets

llvm::AsmPrinter* getAsmPrinter() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:86

virtual llvm::DwarfCompileUnit& getCU()

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:275

const llvm::DICompileUnit* getCUNode() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:89

llvm::DIE* getDIE(const llvm::DINode* D) const

Description

Returns the DIE 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.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:118

Parameters

const llvm::DINode* D

llvm::DIELoc* getDIELoc()

Description

Returns a fresh newly allocated DIELoc.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:121

uint16_t getDwarfVersion() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:91

llvm::MCSymbol* getEndLabel() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:87

virtual unsigned int getHeaderSize() const

Description

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

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:258

uint16_t getLanguage() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:88

Optional<MD5::MD5Result> getMD5AsBytes(
    const llvm::DIFile* File) const

Description

If the \p File has an MD5 checksum, return it as an MD5Result allocated in the MCContext.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:290

Parameters

const llvm::DIFile* File

llvm::DIE* getOrCreateContextDIE(
    const llvm::DIScope* Context)

Description

Get context owner's DIE.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:240

Parameters

const llvm::DIScope* Context

llvm::DIE* getOrCreateModule(
    const llvm::DIModule* M)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:227

Parameters

const llvm::DIModule* M

llvm::DIE* getOrCreateNameSpace(
    const llvm::DINamespace* NS)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:226

Parameters

const llvm::DINamespace* NS

virtual unsigned int getOrCreateSourceID(
    const llvm::DIFile* File)

Description

Look up the source ID for the given file. If none currently exists, create a new ID and insert it in the line table.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:303

Parameters

const llvm::DIFile* File

llvm::DIE* getOrCreateStaticMemberDIE(
    const llvm::DIDerivedType* DT)

Description

Create new static data member DIE.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:299

Parameters

const llvm::DIDerivedType* DT

llvm::DIE* getOrCreateSubprogramDIE(
    const llvm::DISubprogram* SP,
    bool Minimal = false)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:228

Parameters

const llvm::DISubprogram* SP
bool Minimal = false

llvm::DIE* getOrCreateTypeDIE(
    const llvm::MDNode* TyNode)

Description

Find existing DIE or create new DIE for the given type.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:237

Parameters

const llvm::MDNode* TyNode

std::string getParentContextString(
    const llvm::DIScope* Context) const

Description

Get string containing language specific context for a global name. 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.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:103

Parameters

const llvm::DIScope* Context

bool hasContent() const

Description

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

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:94

void insertDIE(const llvm::DINode* Desc,
               llvm::DIE* D)

Description

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.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:128

Parameters

const llvm::DINode* Desc
llvm::DIE* D

void insertDIE(llvm::DIE* D)

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:130

Parameters

llvm::DIE* D

bool isShareableAcrossCUs(
    const llvm::DINode* D) const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:82

Parameters

const llvm::DINode* D

bool shareAcrossDWOCUs() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:81

bool useSegmentedStringOffsetsTable() const

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:252

~DwarfUnit()

Description

The size in bytes of an address for this unit.

Declared at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:296