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,
127 return DebugLineEmitter.
emit(OutLineTable, OrigRowIndices,
128 RowIndexToSeqStartOffset);
145 uint64_t OffsetAfterSectionLength = OutDebugStrOffsetsSection.
OS.
tell();
156 OutDebugStrOffsetsSection.notePatch(
160 OutDebugStrOffsetsSection.
emitOffset(0xBADDEF);
164 OutDebugStrOffsetsSection.
apply(
165 OffsetAfterSectionLength -
167 dwarf::DW_FORM_sec_offset,
168 OutDebugStrOffsetsSection.
OS.
tell() - OffsetAfterSectionLength);
175std::optional<uint64_t>
178 std::optional<uint64_t> LengthOffset) {
183 LengthOffset = OutSection.
OS.
tell();
204 std::optional<uint64_t> NamesLengthOffset;
205 std::optional<uint64_t> TypesLengthOffset;
208 if (Info.AvoidForPubSections)
228 if (NamesLengthOffset) {
233 OutSection.
apply(*NamesLengthOffset -
235 dwarf::DW_FORM_sec_offset,
236 OutSection.
OS.
tell() - *NamesLengthOffset);
239 if (TypesLengthOffset) {
244 OutSection.
apply(*TypesLengthOffset -
246 dwarf::DW_FORM_sec_offset,
247 OutSection.
OS.
tell() - *TypesLengthOffset);
dxil DXContainer Global Emitter
Represent a constant reference to an array (0 or more elements consecutively in memory),...
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.
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, ArrayRef< uint64_t > OrigRowIndices={}, DenseMap< uint64_t, uint64_t > *RowIndexToSeqStartOffset=nullptr)
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 emitDebugLine(const Triple &TargetTriple, const DWARFDebugLine::LineTable &OutLineTable, ArrayRef< uint64_t > OrigRowIndices={}, DenseMap< uint64_t, uint64_t > *RowIndexToSeqStartOffset=nullptr)
Emit .debug_line section.
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()
StringMapEntry< EmptyStringSetTag > 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.