32 for (
const auto &Attr : Abbrev.
getData())
50 for (
const auto &Abbrev : Abbrevs)
81 if (AttrData.getForm() == dwarf::DW_FORM_implicit_const)
105 Emitter.emitCompileUnitHeader(*
this);
106 size_t OffsetToAbbreviationTableOffset =
109 OffsetToAbbreviationTableOffset,
125 return DebugLineEmitter.
emit(OutLineTable);
142 uint64_t OffsetAfterSectionLength = OutDebugStrOffsetsSection.
OS.
tell();
153 OutDebugStrOffsetsSection.notePatch(
157 OutDebugStrOffsetsSection.
emitOffset(0xBADDEF);
161 OutDebugStrOffsetsSection.
apply(
162 OffsetAfterSectionLength -
164 dwarf::DW_FORM_sec_offset,
165 OutDebugStrOffsetsSection.
OS.
tell() - OffsetAfterSectionLength);
172std::optional<uint64_t>
175 std::optional<uint64_t> LengthOffset) {
180 LengthOffset = OutSection.
OS.
tell();
201 std::optional<uint64_t> NamesLengthOffset;
202 std::optional<uint64_t> TypesLengthOffset;
205 if (Info.AvoidForPubSections)
225 if (NamesLengthOffset) {
230 OutSection.
apply(*NamesLengthOffset -
232 dwarf::DW_FORM_sec_offset,
233 OutSection.
OS.
tell() - *NamesLengthOffset);
236 if (TypesLengthOffset) {
241 OutSection.
apply(*TypesLengthOffset -
243 dwarf::DW_FORM_sec_offset,
244 OutSection.
OS.
tell() - *TypesLengthOffset);
dxil DXContainer Global Emitter
Dwarf abbreviation data, describes one attribute of a Dwarf abbreviation.
Dwarf abbreviation, describes the organization of a debug information object.
unsigned getNumber() const
const SmallVectorImpl< DIEAbbrevData > & getData() const
dwarf::Tag getTag() const
Accessors.
void setNumber(unsigned N)
LLVM_ABI void Profile(FoldingSetNodeID &ID) const
Used to gather unique data for the abbreviation folding set.
A structured debug information entry.
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
FoldingSetNodeID - This class is used to gather all the unique data bits of a node.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Triple - Helper class for working with autoconf configuration names.
This class emits specified line table into the .debug_line section.
Error emit(const DWARFDebugLine::LineTable &LineTable)
This class emits DWARF data to the output stream.
std::vector< std::unique_ptr< DIEAbbrev > > Abbreviations
Storage for the unique Abbreviations.
DIE * OutUnitDIE
Output unit DIE.
uint64_t getUnitSize() const
Returns size of this(newly generated) compile unit.
void assignAbbrev(DIEAbbrev &Abbrev)
Adds Abbrev into unit`s abbreviation table.
IndexedValuesMap< const StringEntry * > DebugStringIndexMap
Maps a string into the index inside .debug_str_offsets section.
std::optional< uint64_t > emitPubAcceleratorEntry(SectionDescriptor &OutSection, const AccelInfo &Info, std::optional< uint64_t > LengthOffset)
Emit single pubnames/pubtypes accelerator entry.
unsigned ID
Unique ID for the unit.
const std::vector< std::unique_ptr< DIEAbbrev > > & getAbbreviations() const
Returns abbreviations for this compile unit.
void emitDwarfAbbrevEntry(const DIEAbbrev &Abbrev, SectionDescriptor &AbbrevSection)
Emit single abbreviation entry.
FoldingSet< DIEAbbrev > AbbreviationsSet
FoldingSet that uniques the abbreviations.
DIE * getOutUnitDIE()
Returns output unit DIE.
const dwarf::FormParams & getFormParams() const
Return size of address.
uint16_t getVersion() const
Return DWARF version.
SectionDescriptor & getOrCreateSectionDescriptor(DebugSectionKind SectionKind)
Returns descriptor for the specified section of SectionKind.
uint64_t tell() const
tell - Return the current offset with the file.
Error emitDebugInfo(const Triple &TargetTriple)
Emit .debug_info section for unit DIEs.
Error emitDebugStringOffsetSection()
Emit the .debug_str_offsets section for current unit.
virtual void forEachAcceleratorRecord(function_ref< void(AccelInfo &)> Handler)=0
Enumerates accelerator data.
void emitPubAccelerators()
Emit .debug_pubnames and .debug_pubtypes for Unit.
Error emitAbbreviations()
Error emitDebugLine(const Triple &TargetTriple, const DWARFDebugLine::LineTable &OutLineTable)
Emit .debug_line section.
StringMapEntry< std::nullopt_t > StringEntry
StringEntry keeps data of the string: the length, external offset and a string body which is placed r...
@ DW_PUBNAMES_VERSION
Section version number for .debug_pubnames.
This is an optimization pass for GlobalISel generic memory operations.
FunctionAddr VTableAddr uintptr_t uintptr_t Data
unsigned encodeSLEB128(int64_t Value, raw_ostream &OS, unsigned PadTo=0)
Utility function to encode a SLEB128 value to an output stream.
unsigned encodeULEB128(uint64_t Value, raw_ostream &OS, unsigned PadTo=0)
Utility function to encode a ULEB128 value to an output stream.
This structure is used to update strings offsets into .debug_str.
This structure keeps fields which would be used for creating accelerator table.
dwarf::FormParams getFormParams() const
Returns FormParams used by section.
This structure is used to keep data of the concrete section.
raw_svector_ostream OS
Stream which stores data to the Contents.
void setSizesForSectionCreatedByAsmPrinter()
Some sections are emitted using AsmPrinter.
void emitUnitLength(uint64_t Length)
Emit unit length into the current section contents.
void emitOffset(uint64_t Val)
Emit specified offset value into the current section contents.
void emitIntVal(uint64_t Val, unsigned Size)
Emit specified integer value into the current section contents.
void apply(uint64_t PatchOffset, dwarf::Form AttrForm, uint64_t Val)
Write specified Value of AttrForm to the PatchOffset.
void emitInplaceString(StringRef String)
Emit specified inplace string value into the current section contents.