LLVM API Documentation
#include <DwarfFile.h>
Public Member Functions | |
DwarfFile (AsmPrinter *AP, StringRef Pref, BumpPtrAllocator &DA) | |
~DwarfFile () | |
const SmallVectorImpl < std::unique_ptr< DwarfUnit > > & | getUnits () |
unsigned | computeSizeAndOffset (DIE &Die, unsigned Offset) |
Compute the size and offset of a DIE given an incoming Offset. | |
void | computeSizeAndOffsets () |
Compute the size and offset of all the DIEs. | |
void | assignAbbrevNumber (DIEAbbrev &Abbrev) |
Define a unique number for the abbreviation. | |
void | addUnit (std::unique_ptr< DwarfUnit > U) |
Add a unit to the list of CUs. | |
void | emitUnits (DwarfDebug *DD, const MCSymbol *ASectionSym) |
Emit all of the units to the section listed with the given abbreviation section. | |
void | emitAbbrevs (const MCSection *) |
Emit a set of abbreviations to the specific section. | |
void | emitStrings (const MCSection *StrSection, const MCSection *OffsetSection=nullptr) |
Emit all of the strings to the section given. | |
DwarfStringPool & | getStringPool () |
Returns the string pool. |
Definition at line 34 of file DwarfFile.h.
llvm::DwarfFile::DwarfFile | ( | AsmPrinter * | AP, |
StringRef | Pref, | ||
BumpPtrAllocator & | DA | ||
) |
Definition at line 21 of file DwarfFile.cpp.
Definition at line 24 of file DwarfFile.cpp.
void llvm::DwarfFile::addUnit | ( | std::unique_ptr< DwarfUnit > | U | ) |
Add a unit to the list of CUs.
Definition at line 45 of file DwarfFile.cpp.
References llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().
void llvm::DwarfFile::assignAbbrevNumber | ( | DIEAbbrev & | Abbrev | ) |
Define a unique number for the abbreviation.
Definition at line 28 of file DwarfFile.cpp.
References llvm::DIEAbbrev::getNumber(), llvm::FoldingSet< T >::GetOrInsertNode(), and llvm::DIEAbbrev::setNumber().
Referenced by computeSizeAndOffset().
unsigned llvm::DwarfFile::computeSizeAndOffset | ( | DIE & | Die, |
unsigned | Offset | ||
) |
Compute the size and offset of a DIE given an incoming Offset.
Definition at line 92 of file DwarfFile.cpp.
References assignAbbrevNumber(), llvm::DIE::getAbbrev(), llvm::DIE::getAbbrevNumber(), llvm::DIE::getChildren(), llvm::DIE::getOffset(), llvm::getULEB128Size(), llvm::DIE::getValues(), N, llvm::DIE::setOffset(), and llvm::DIE::setSize().
Referenced by computeSizeAndOffsets().
Compute the size and offset of all the DIEs.
Definition at line 71 of file DwarfFile.cpp.
References computeSizeAndOffset().
void llvm::DwarfFile::emitAbbrevs | ( | const MCSection * | Section | ) |
Emit a set of abbreviations to the specific section.
Definition at line 130 of file DwarfFile.cpp.
References llvm::AsmPrinter::EmitULEB128(), llvm::AsmPrinter::OutStreamer, and llvm::MCStreamer::SwitchSection().
void llvm::DwarfFile::emitStrings | ( | const MCSection * | StrSection, |
const MCSection * | OffsetSection = nullptr |
||
) |
Emit all of the strings to the section given.
Definition at line 151 of file DwarfFile.cpp.
References llvm::DwarfStringPool::emit().
void llvm::DwarfFile::emitUnits | ( | DwarfDebug * | DD, |
const MCSymbol * | ASectionSym | ||
) |
Emit all of the units to the section listed with the given abbreviation section.
Definition at line 51 of file DwarfFile.cpp.
References llvm::MCStreamer::AddComment(), llvm::DwarfDebug::emitDIE(), llvm::AsmPrinter::EmitInt32(), llvm::MCStreamer::EmitLabel(), llvm::DIE::getSize(), llvm::AsmPrinter::OutStreamer, and llvm::MCStreamer::SwitchSection().
DwarfStringPool& llvm::DwarfFile::getStringPool | ( | ) | [inline] |
Returns the string pool.
Definition at line 80 of file DwarfFile.h.
Referenced by llvm::DwarfDebug::addAccelName(), llvm::DwarfDebug::addAccelNamespace(), llvm::DwarfDebug::addAccelObjC(), llvm::DwarfDebug::addAccelType(), llvm::DwarfUnit::addLocalString(), and llvm::DwarfUnit::addString().
const SmallVectorImpl<std::unique_ptr<DwarfUnit> >& llvm::DwarfFile::getUnits | ( | ) | [inline] |
Definition at line 54 of file DwarfFile.h.
Referenced by llvm::DwarfDebug::addDwarfTypeUnitType().