LLVM 20.0.0git
|
#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). | |
Definition at line 26 of file DwarfStringPool.h.
Definition at line 38 of file DwarfStringPool.h.
DwarfStringPool::DwarfStringPool | ( | BumpPtrAllocator & | A, |
AsmPrinter & | Asm, | ||
StringRef | Prefix | ||
) |
Definition at line 20 of file DwarfStringPool.cpp.
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().
void DwarfStringPool::emitStringOffsetsTableHeader | ( | AsmPrinter & | Asm, |
MCSection * | OffsetSection, | ||
MCSymbol * | StartSym | ||
) |
Definition at line 53 of file DwarfStringPool.cpp.
References getNumIndexedStrings().
|
inline |
Definition at line 49 of file DwarfStringPool.h.
References llvm::StringMapImpl::empty().
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().
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().
|
inline |
Definition at line 53 of file DwarfStringPool.h.
Referenced by emitStringOffsetsTableHeader().
|
inline |
Definition at line 51 of file DwarfStringPool.h.
References llvm::StringMapImpl::size().
Referenced by emit().