class DwarfTypeUnit

Declaration

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

Description

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

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

Inherits from: DwarfUnit

Member Variables

private uint64_t TypeSignature
private const llvm::DIE* Ty
private llvm::DwarfCompileUnit& CU
private llvm::MCDwarfDwoLineTable* SplitLineTable
private bool UsedLineTable = false

Inherited from DwarfUnit:

protected CUNode
protected DIEValueAllocator
protected Asm
protected EndLabel = nullptr
protected DD
protected DU
protected IndexTyDie = nullptr
protected MDNodeToDieMap
protected DIEBlocks
protected DIELocs
protected ContainingTypeMap

Method Overview

  • public DwarfTypeUnit(llvm::DwarfCompileUnit & CU, llvm::AsmPrinter * A, llvm::DwarfDebug * DW, llvm::DwarfFile * DWU, llvm::MCDwarfDwoLineTable * SplitLineTable = nullptr)
  • public void addGlobalName(llvm::StringRef Name, const llvm::DIE & Die, const llvm::DIScope * Context)
  • public void addGlobalType(const llvm::DIType * Ty, const llvm::DIE & Die, const llvm::DIScope * Context)
  • public void emitHeader(bool UseOffsets)
  • private void finishNonUnitTypeDIE(llvm::DIE & D, const llvm::DICompositeType * CTy)
  • public llvm::DwarfCompileUnit & getCU()
  • public unsigned int getHeaderSize() const
  • private unsigned int getOrCreateSourceID(const llvm::DIFile * File)
  • private bool isDwoUnit() const
  • public void setType(const llvm::DIE * Ty)
  • public void setTypeSignature(uint64_t Signature)

Inherited from DwarfUnit:

Inherited from DIEUnit:

Methods

DwarfTypeUnit(llvm::DwarfCompileUnit& CU,
              llvm::AsmPrinter* A,
              llvm::DwarfDebug* DW,
              llvm::DwarfFile* DWU,
              llvm::MCDwarfDwoLineTable*
                  SplitLineTable = nullptr)

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

Parameters

llvm::DwarfCompileUnit& CU
llvm::AsmPrinter* A
llvm::DwarfDebug* DW
llvm::DwarfFile* DWU
llvm::MCDwarfDwoLineTable* SplitLineTable = nullptr

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:379

Parameters

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

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:381

Parameters

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

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:374

Parameters

bool UseOffsets

void finishNonUnitTypeDIE(
    llvm::DIE& D,
    const llvm::DICompositeType* CTy)

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

Parameters

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

llvm::DwarfCompileUnit& getCU()

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

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:375

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:362

Parameters

const llvm::DIFile* File

bool isDwoUnit() const

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

void setType(const llvm::DIE* Ty)

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

Parameters

const llvm::DIE* Ty

void setTypeSignature(uint64_t Signature)

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

Parameters

uint64_t Signature