LLVM  8.0.1
Public Types | Public Member Functions | List of all members
llvm::DwarfStringPool Class Reference

#include "CodeGen/AsmPrinter/DwarfStringPool.h"

Public Types

using EntryRef = DwarfStringPoolEntryRef
 

Public Member Functions

 DwarfStringPool (BumpPtrAllocator &A, AsmPrinter &Asm, StringRef Prefix)
 
void emitStringOffsetsTableHeader (AsmPrinter &Asm, MCSection *OffsetSection, MCSymbol *StartSym)
 
void emit (AsmPrinter &Asm, MCSection *StrSection, MCSection *OffsetSection=nullptr, bool UseRelativeOffsets=false)
 
bool empty () const
 
unsigned size () const
 
unsigned getNumIndexedStrings () const
 
EntryRef getEntry (AsmPrinter &Asm, StringRef Str)
 Get a reference to an entry in the string pool. More...
 
EntryRef getIndexedEntry (AsmPrinter &Asm, StringRef Str)
 Same as getEntry, except that you can use EntryRef::getIndex to obtain a unique ID of this entry (e.g., for use in indexed forms like DW_FORM_strx). More...
 

Detailed Description

Definition at line 27 of file DwarfStringPool.h.

Member Typedef Documentation

◆ EntryRef

Definition at line 39 of file DwarfStringPool.h.

Constructor & Destructor Documentation

◆ DwarfStringPool()

DwarfStringPool::DwarfStringPool ( BumpPtrAllocator A,
AsmPrinter Asm,
StringRef  Prefix 
)

Member Function Documentation

◆ emit()

void DwarfStringPool::emit ( AsmPrinter Asm,
MCSection StrSection,
MCSection OffsetSection = nullptr,
bool  UseRelativeOffsets = false 
)

◆ emitStringOffsetsTableHeader()

void DwarfStringPool::emitStringOffsetsTableHeader ( AsmPrinter Asm,
MCSection OffsetSection,
MCSymbol StartSym 
)

◆ empty()

bool llvm::DwarfStringPool::empty ( ) const
inline

Definition at line 50 of file DwarfStringPool.h.

References llvm::StringMapImpl::empty().

◆ getEntry()

DwarfStringPool::EntryRef DwarfStringPool::getEntry ( AsmPrinter Asm,
StringRef  Str 
)

Get a reference to an entry in the string pool.

Definition at line 42 of file DwarfStringPool.cpp.

Referenced by llvm::DwarfDebug::addDwarfTypeUnitType(), llvm::DwarfUnit::addString(), and getNumIndexedStrings().

◆ getIndexedEntry()

DwarfStringPool::EntryRef DwarfStringPool::getIndexedEntry ( AsmPrinter Asm,
StringRef  Str 
)

Same as getEntry, except that you can use EntryRef::getIndex to obtain a unique ID of this entry (e.g., for use in indexed forms like DW_FORM_strx).

Definition at line 48 of file DwarfStringPool.cpp.

Referenced by llvm::DwarfUnit::addString(), and getNumIndexedStrings().

◆ getNumIndexedStrings()

unsigned llvm::DwarfStringPool::getNumIndexedStrings ( ) const
inline

Definition at line 54 of file DwarfStringPool.h.

References getEntry(), and getIndexedEntry().

Referenced by emitStringOffsetsTableHeader().

◆ size()

unsigned llvm::DwarfStringPool::size ( ) const
inline

Definition at line 52 of file DwarfStringPool.h.

References llvm::StringMapImpl::size().

Referenced by emit().


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