22 :
Asm(AP), Abbrevs(AbbrevAllocator), StrPool(DA, *
Asm, Pref) {}
25 CUs.push_back(std::move(U));
31 for (
const auto &TheU : CUs)
48 unsigned SecOffset = 0;
52 for (
const auto &TheU : CUs) {
53 TheU->setDebugSectionOffset(SecOffset);
60 unsigned Offset =
sizeof(int32_t) +
78 StrPool.
emit(*Asm, StrSection, OffsetSection);
85 if (
unsigned ArgNum = DV->
getArg()) {
94 while (
I != Vars.
end()) {
95 unsigned CurNum = (*I)->getVariable()->getArg();
103 if (CurNum == ArgNum) {
104 (*I)->addMMIEntry(*Var);
Instances of this class represent a uniqued identifier for a section in the current translation unit...
void push_back(const T &Elt)
std::unique_ptr< MCStreamer > OutStreamer
This is the MCStreamer object for the file we are generating.
DwarfFile(AsmPrinter *AP, StringRef Pref, BumpPtrAllocator &DA)
LexicalScope - This class is used to track scope information.
void emitDwarfDIE(const DIE &Die) const
Recursively emit Dwarf DIE tree.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
virtual void emitHeader(bool UseOffsets)=0
Emit the header for this unit, not including the initial length field.
This class is used to track local variable information.
virtual unsigned getHeaderSize() const
Compute the size of a header for this unit, not including the initial length field.
void addUnit(std::unique_ptr< DwarfCompileUnit > U)
Add a unit to the list of CUs.
This dwarf writer support class manages information associated with a source file.
Allocate memory in an ever growing pool, as if by bump-pointer.
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator begin()
A structured debug information entry.
void Emit(const AsmPrinter *AP, MCSection *Section) const
Print all abbreviations using the specified asm printer.
This class is intended to be used as a driving class for all asm writers.
void emitUnits(bool UseOffsets)
Emit all of the units to the section listed with the given abbreviation section.
unsigned computeOffsetsAndAbbrevs(const AsmPrinter *AP, DIEAbbrevSet &AbbrevSet, unsigned CUOffset)
Compute the offset of this DIE and all its children.
void computeSizeAndOffsets()
Compute the size and offset of all the DIEs.
unsigned computeSizeAndOffsetsForUnit(DwarfUnit *TheU)
Compute the size and offset of all the DIEs in the given unit.
void emitUnit(DwarfUnit *U, bool UseOffsets)
Emit the given unit to its section.
const DILocalVariable * getVariable() const
void emitAbbrevs(MCSection *)
Emit a set of abbreviations to the specific section.
iterator insert(iterator I, T &&Elt)
bool addScopeVariable(LexicalScope *LS, DbgVariable *Var)
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator end()
unsigned computeSizeAndOffset(DIE &Die, unsigned Offset)
Compute the size and offset of a DIE given an incoming Offset.
void emitStrings(MCSection *StrSection, MCSection *OffsetSection=nullptr)
Emit all of the strings to the section given.
MCSection * getSection() const
Return the section that this DIEUnit will be emitted into.
void emit(AsmPrinter &Asm, MCSection *StrSection, MCSection *OffsetSection=nullptr)
StringRef - Represent a constant reference to a string, i.e.