LLVM 20.0.0git
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.
 
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).
 

Detailed Description

Definition at line 26 of file DwarfStringPool.h.

Member Typedef Documentation

◆ EntryRef

Definition at line 38 of file DwarfStringPool.h.

Constructor & Destructor Documentation

◆ DwarfStringPool()

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

Definition at line 20 of file DwarfStringPool.cpp.

Member Function Documentation

◆ emit()

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

Definition at line 75 of file DwarfStringPool.cpp.

References A, assert(), B, llvm::Offset, size(), and llvm::sort().

Referenced by llvm::DwarfFile::emitStrings().

◆ emitStringOffsetsTableHeader()

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

Definition at line 53 of file DwarfStringPool.cpp.

References getNumIndexedStrings().

◆ empty()

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

Definition at line 49 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 39 of file DwarfStringPool.cpp.

Referenced by llvm::DwarfUnit::addString().

◆ 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 45 of file DwarfStringPool.cpp.

Referenced by llvm::DwarfUnit::addString().

◆ getNumIndexedStrings()

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

Definition at line 53 of file DwarfStringPool.h.

Referenced by emitStringOffsetsTableHeader().

◆ size()

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

Definition at line 51 of file DwarfStringPool.h.

References llvm::StringMapImpl::size().

Referenced by emit().


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