LLVM
8.0.1
|
#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... | |
Definition at line 27 of file DwarfStringPool.h.
Definition at line 39 of file DwarfStringPool.h.
DwarfStringPool::DwarfStringPool | ( | BumpPtrAllocator & | A, |
AsmPrinter & | Asm, | ||
StringRef | Prefix | ||
) |
Definition at line 22 of file DwarfStringPool.cpp.
References llvm::HexStyle::Asm, assert(), llvm::AsmPrinter::createTempSymbol(), I, llvm::DwarfStringPoolEntry::NotIndexed, and llvm::StringRef::size().
void DwarfStringPool::emit | ( | AsmPrinter & | Asm, |
MCSection * | StrSection, | ||
MCSection * | OffsetSection = nullptr , |
||
bool | UseRelativeOffsets = false |
||
) |
Definition at line 78 of file DwarfStringPool.cpp.
References assert(), B, E, llvm::AsmPrinter::emitDwarfStringOffset(), llvm::StringMapEntry< ValueTy >::getValue(), llvm::DwarfStringPoolEntry::Offset, llvm::AsmPrinter::OutStreamer, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::SmallVectorImpl< T >::reserve(), size(), and llvm::sort().
Referenced by llvm::DwarfFile::emitStrings().
void DwarfStringPool::emitStringOffsetsTableHeader | ( | AsmPrinter & | Asm, |
MCSection * | OffsetSection, | ||
MCSymbol * | StartSym | ||
) |
Definition at line 56 of file DwarfStringPool.cpp.
References llvm::AsmPrinter::emitInt16(), llvm::AsmPrinter::emitInt32(), llvm::AsmPrinter::getDwarfVersion(), getNumIndexedStrings(), and llvm::AsmPrinter::OutStreamer.
Referenced by llvm::DwarfDebug::endFunctionImpl().
|
inline |
Definition at line 50 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 42 of file DwarfStringPool.cpp.
Referenced by llvm::DwarfDebug::addDwarfTypeUnitType(), llvm::DwarfUnit::addString(), and getNumIndexedStrings().
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().
|
inline |
Definition at line 54 of file DwarfStringPool.h.
References getEntry(), and getIndexedEntry().
Referenced by emitStringOffsetsTableHeader().
|
inline |
Definition at line 52 of file DwarfStringPool.h.
References llvm::StringMapImpl::size().
Referenced by emit().