LLVM 18.0.0git
Classes | Public Member Functions | List of all members
llvm::DwarfStreamer Class Reference

The Dwarf streaming logic. More...

#include "llvm/DWARFLinker/DWARFStreamer.h"

Inheritance diagram for llvm::DwarfStreamer:
Inheritance graph
[legend]

Public Member Functions

 DwarfStreamer (DWARFLinker::OutputFileType OutFileType, raw_pwrite_stream &OutFile, std::function< StringRef(StringRef Input)> Translator, DWARFLinker::messageHandler Warning)
 
Error init (Triple TheTriple, StringRef Swift5ReflectionSegmentName)
 
void finish () override
 Dump the file to the disk.
 
AsmPrintergetAsmPrinter () const override
 Returns underlying AsmPrinter.
 
void switchToDebugInfoSection (unsigned DwarfVersion)
 Set the current output section to debug_info and change the MC Dwarf version to DwarfVersion.
 
void emitCompileUnitHeader (CompileUnit &Unit, unsigned DwarfVersion) override
 Emit the compilation unit header for Unit in the debug_info section.
 
void emitDIE (DIE &Die) override
 Recursively emit the DIE tree rooted at Die.
 
void emitAbbrevs (const std::vector< std::unique_ptr< DIEAbbrev > > &Abbrevs, unsigned DwarfVersion) override
 Emit the abbreviation table Abbrevs to the debug_abbrev section.
 
void emitSectionContents (StringRef SecData, StringRef SecName) override
 Emit contents of section SecName From Obj.
 
void emitStrings (const NonRelocatableStringpool &Pool) override
 Emit the string table described by Pool into .debug_str table.
 
void emitStringOffsets (const SmallVector< uint64_t > &StringOffset, uint16_t TargetDWARFVersion) override
 Emit the debug string offset table described by StringOffsets into the .debug_str_offsets table.
 
void emitLineStrings (const NonRelocatableStringpool &Pool) override
 Emit the string table described by Pool into .debug_line_str table.
 
void emitSwiftAST (StringRef Buffer) override
 Emit the swift_ast section stored in Buffer.
 
void emitSwiftReflectionSection (llvm::binaryformat::Swift5ReflectionSectionKind ReflSectionKind, StringRef Buffer, uint32_t Alignment, uint32_t Size) override
 Emit the swift reflection section stored in Buffer.
 
MCSymbolemitDwarfDebugRangeListHeader (const CompileUnit &Unit) override
 Emit debug ranges(.debug_ranges, .debug_rnglists) header.
 
void emitDwarfDebugRangeListFragment (const CompileUnit &Unit, const AddressRanges &LinkedRanges, PatchLocation Patch, DebugDieValuePool &AddrPool) override
 Emit debug ranges(.debug_ranges, .debug_rnglists) fragment.
 
void emitDwarfDebugRangeListFooter (const CompileUnit &Unit, MCSymbol *EndLabel) override
 Emit debug ranges(.debug_ranges, .debug_rnglists) footer.
 
MCSymbolemitDwarfDebugLocListHeader (const CompileUnit &Unit) override
 Emit debug locations(.debug_loc, .debug_loclists) header.
 
MCSymbolemitDwarfDebugAddrsHeader (const CompileUnit &Unit) override
 Emit .debug_addr header.
 
void emitDwarfDebugAddrs (const SmallVector< uint64_t > &Addrs, uint8_t AddrSize) override
 Emit the addresses described by Addrs into .debug_addr table.
 
void emitDwarfDebugAddrsFooter (const CompileUnit &Unit, MCSymbol *EndLabel) override
 Emit .debug_addr footer.
 
void emitDwarfDebugLocListFragment (const CompileUnit &Unit, const DWARFLocationExpressionsVector &LinkedLocationExpression, PatchLocation Patch, DebugDieValuePool &AddrPool) override
 Emit debug ranges(.debug_loc, .debug_loclists) fragment.
 
void emitDwarfDebugLocListFooter (const CompileUnit &Unit, MCSymbol *EndLabel) override
 Emit debug ranges(.debug_loc, .debug_loclists) footer.
 
void emitDwarfDebugArangesTable (const CompileUnit &Unit, const AddressRanges &LinkedRanges) override
 Emit .debug_aranges entries for Unit.
 
uint64_t getRangesSectionSize () const override
 Returns size of generated .debug_ranges section.
 
uint64_t getRngListsSectionSize () const override
 Returns size of generated .debug_rnglists section.
 
void emitLineTableForUnit (const DWARFDebugLine::LineTable &LineTable, const CompileUnit &Unit, OffsetsStringPool &DebugStrPool, OffsetsStringPool &DebugLineStrPool) override
 Emit .debug_line table entry for specified LineTable.
 
uint64_t getLineSectionSize () const override
 Returns size of generated .debug_line section.
 
void emitPubNamesForUnit (const CompileUnit &Unit) override
 Emit the .debug_pubnames contribution for Unit.
 
void emitPubTypesForUnit (const CompileUnit &Unit) override
 Emit the .debug_pubtypes contribution for Unit.
 
void emitCIE (StringRef CIEBytes) override
 Emit a CIE.
 
void emitFDE (uint32_t CIEOffset, uint32_t AddreSize, uint64_t Address, StringRef Bytes) override
 Emit an FDE with data Bytes.
 
void emitDebugNames (AccelTable< DWARF5AccelTableStaticData > &Table) override
 Emit DWARF debug names.
 
void emitAppleNamespaces (AccelTable< AppleAccelTableStaticOffsetData > &Table) override
 Emit Apple namespaces accelerator table.
 
void emitAppleNames (AccelTable< AppleAccelTableStaticOffsetData > &Table) override
 Emit Apple names accelerator table.
 
void emitAppleObjc (AccelTable< AppleAccelTableStaticOffsetData > &Table) override
 Emit Apple Objective-C accelerator table.
 
void emitAppleTypes (AccelTable< AppleAccelTableStaticTypeData > &Table) override
 Emit Apple type accelerator table.
 
uint64_t getFrameSectionSize () const override
 Returns size of generated .debug_frame section.
 
uint64_t getDebugInfoSectionSize () const override
 Returns size of generated .debug_info section.
 
uint64_t getDebugMacInfoSectionSize () const override
 Returns size of generated .debug_macinfo section.
 
uint64_t getDebugMacroSectionSize () const override
 Returns size of generated .debug_macro section.
 
uint64_t getLocListsSectionSize () const override
 Returns size of generated .debug_loclists section.
 
uint64_t getDebugAddrSectionSize () const override
 Returns size of generated .debug_addr section.
 
void emitMacroTables (DWARFContext *Context, const Offset2UnitMap &UnitMacroMap, OffsetsStringPool &StringPool) override
 Emit all available macro tables(DWARFv4 and DWARFv5).
 
- Public Member Functions inherited from llvm::DwarfEmitter
virtual ~DwarfEmitter ()
 
virtual void emitSectionContents (StringRef SecData, StringRef SecName)=0
 Emit section named SecName with data SecData.
 
virtual void emitAbbrevs (const std::vector< std::unique_ptr< DIEAbbrev > > &Abbrevs, unsigned DwarfVersion)=0
 Emit the abbreviation table Abbrevs to the .debug_abbrev section.
 
virtual void emitStrings (const NonRelocatableStringpool &Pool)=0
 Emit the string table described by Pool into .debug_str table.
 
virtual void emitStringOffsets (const SmallVector< uint64_t > &StringOffsets, uint16_t TargetDWARFVersion)=0
 Emit the debug string offset table described by StringOffsets into the .debug_str_offsets table.
 
virtual void emitLineStrings (const NonRelocatableStringpool &Pool)=0
 Emit the string table described by Pool into .debug_line_str table.
 
virtual void emitDebugNames (AccelTable< DWARF5AccelTableStaticData > &Table)=0
 Emit DWARF debug names.
 
virtual void emitAppleNamespaces (AccelTable< AppleAccelTableStaticOffsetData > &Table)=0
 Emit Apple namespaces accelerator table.
 
virtual void emitAppleNames (AccelTable< AppleAccelTableStaticOffsetData > &Table)=0
 Emit Apple names accelerator table.
 
virtual void emitAppleObjc (AccelTable< AppleAccelTableStaticOffsetData > &Table)=0
 Emit Apple Objective-C accelerator table.
 
virtual void emitAppleTypes (AccelTable< AppleAccelTableStaticTypeData > &Table)=0
 Emit Apple type accelerator table.
 
virtual MCSymbolemitDwarfDebugRangeListHeader (const CompileUnit &Unit)=0
 Emit debug ranges (.debug_ranges, .debug_rnglists) header.
 
virtual void emitDwarfDebugRangeListFragment (const CompileUnit &Unit, const AddressRanges &LinkedRanges, PatchLocation Patch, DebugDieValuePool &AddrPool)=0
 Emit debug ranges (.debug_ranges, .debug_rnglists) fragment.
 
virtual void emitDwarfDebugRangeListFooter (const CompileUnit &Unit, MCSymbol *EndLabel)=0
 Emit debug ranges (.debug_ranges, .debug_rnglists) footer.
 
virtual MCSymbolemitDwarfDebugLocListHeader (const CompileUnit &Unit)=0
 Emit debug locations (.debug_loc, .debug_loclists) header.
 
virtual void emitDwarfDebugLocListFragment (const CompileUnit &Unit, const DWARFLocationExpressionsVector &LinkedLocationExpression, PatchLocation Patch, DebugDieValuePool &AddrPool)=0
 Emit debug locations (.debug_loc, .debug_loclists) fragment.
 
virtual void emitDwarfDebugLocListFooter (const CompileUnit &Unit, MCSymbol *EndLabel)=0
 Emit debug locations (.debug_loc, .debug_loclists) footer.
 
virtual MCSymbolemitDwarfDebugAddrsHeader (const CompileUnit &Unit)=0
 Emit .debug_addr header.
 
virtual void emitDwarfDebugAddrs (const SmallVector< uint64_t > &Addrs, uint8_t AddrSize)=0
 Emit the addresses described by Addrs into the .debug_addr section.
 
virtual void emitDwarfDebugAddrsFooter (const CompileUnit &Unit, MCSymbol *EndLabel)=0
 Emit .debug_addr footer.
 
virtual void emitDwarfDebugArangesTable (const CompileUnit &Unit, const AddressRanges &LinkedRanges)=0
 Emit .debug_aranges entries for Unit.
 
virtual void emitLineTableForUnit (const DWARFDebugLine::LineTable &LineTable, const CompileUnit &Unit, OffsetsStringPool &DebugStrPool, OffsetsStringPool &DebugLineStrPool)=0
 Emit specified LineTable into .debug_line table.
 
virtual void emitPubNamesForUnit (const CompileUnit &Unit)=0
 Emit the .debug_pubnames contribution for Unit.
 
virtual void emitPubTypesForUnit (const CompileUnit &Unit)=0
 Emit the .debug_pubtypes contribution for Unit.
 
virtual void emitCIE (StringRef CIEBytes)=0
 Emit a CIE.
 
virtual void emitFDE (uint32_t CIEOffset, uint32_t AddreSize, uint64_t Address, StringRef Bytes)=0
 Emit an FDE with data Bytes.
 
virtual void emitCompileUnitHeader (CompileUnit &Unit, unsigned DwarfVersion)=0
 Emit the compilation unit header for Unit in the .debug_info section.
 
virtual void emitDIE (DIE &Die)=0
 Recursively emit the DIE tree rooted at Die.
 
virtual void emitMacroTables (DWARFContext *Context, const Offset2UnitMap &UnitMacroMap, OffsetsStringPool &StringPool)=0
 Emit all available macro tables(DWARFv4 and DWARFv5).
 
virtual uint64_t getLineSectionSize () const =0
 Returns size of generated .debug_line section.
 
virtual uint64_t getFrameSectionSize () const =0
 Returns size of generated .debug_frame section.
 
virtual uint64_t getRangesSectionSize () const =0
 Returns size of generated .debug_ranges section.
 
virtual uint64_t getRngListsSectionSize () const =0
 Returns size of generated .debug_rnglists section.
 
virtual uint64_t getDebugInfoSectionSize () const =0
 Returns size of generated .debug_info section.
 
virtual uint64_t getDebugMacInfoSectionSize () const =0
 Returns size of generated .debug_macinfo section.
 
virtual uint64_t getDebugMacroSectionSize () const =0
 Returns size of generated .debug_macro section.
 
virtual uint64_t getLocListsSectionSize () const =0
 Returns size of generated .debug_loclists section.
 
virtual uint64_t getDebugAddrSectionSize () const =0
 Returns size of generated .debug_addr section.
 
virtual void finish ()=0
 Dump the file to the disk.
 
virtual void emitSwiftAST (StringRef Buffer)=0
 Emit the swift_ast section stored in Buffer.
 
virtual void emitSwiftReflectionSection (llvm::binaryformat::Swift5ReflectionSectionKind ReflSectionKind, StringRef Buffer, uint32_t Alignment, uint32_t Size)=0
 Emit the swift reflection section stored in Buffer.
 
virtual AsmPrintergetAsmPrinter () const =0
 Returns underlying AsmPrinter.
 

Detailed Description

The Dwarf streaming logic.

All interactions with the MC layer that is used to build the debug information binary representation are handled in this class.

Definition at line 41 of file DWARFStreamer.h.

Constructor & Destructor Documentation

◆ DwarfStreamer()

llvm::DwarfStreamer::DwarfStreamer ( DWARFLinker::OutputFileType  OutFileType,
raw_pwrite_stream OutFile,
std::function< StringRef(StringRef Input)>  Translator,
DWARFLinker::messageHandler  Warning 
)
inline

Definition at line 43 of file DWARFStreamer.h.

Member Function Documentation

◆ emitAbbrevs()

void llvm::DwarfStreamer::emitAbbrevs ( const std::vector< std::unique_ptr< DIEAbbrev > > &  Abbrevs,
unsigned  DwarfVersion 
)
overridevirtual

Emit the abbreviation table Abbrevs to the debug_abbrev section.

Emit the Abbrevs array as the shared abbreviation table for the linked Dwarf file.

Implements llvm::DwarfEmitter.

Definition at line 197 of file DWARFStreamer.cpp.

References llvm::MCStreamer::switchSection().

◆ emitAppleNames()

void llvm::DwarfStreamer::emitAppleNames ( AccelTable< AppleAccelTableStaticOffsetData > &  Table)
overridevirtual

Emit Apple names accelerator table.

Implements llvm::DwarfEmitter.

Definition at line 325 of file DWARFStreamer.cpp.

References llvm::emitAppleAccelTable().

◆ emitAppleNamespaces()

void llvm::DwarfStreamer::emitAppleNamespaces ( AccelTable< AppleAccelTableStaticOffsetData > &  Table)
overridevirtual

Emit Apple namespaces accelerator table.

Implements llvm::DwarfEmitter.

Definition at line 317 of file DWARFStreamer.cpp.

References llvm::emitAppleAccelTable().

◆ emitAppleObjc()

void llvm::DwarfStreamer::emitAppleObjc ( AccelTable< AppleAccelTableStaticOffsetData > &  Table)
overridevirtual

Emit Apple Objective-C accelerator table.

Implements llvm::DwarfEmitter.

Definition at line 333 of file DWARFStreamer.cpp.

References llvm::emitAppleAccelTable().

◆ emitAppleTypes()

void llvm::DwarfStreamer::emitAppleTypes ( AccelTable< AppleAccelTableStaticTypeData > &  Table)
overridevirtual

Emit Apple type accelerator table.

Implements llvm::DwarfEmitter.

Definition at line 341 of file DWARFStreamer.cpp.

References llvm::emitAppleAccelTable().

◆ emitCIE()

void llvm::DwarfStreamer::emitCIE ( StringRef  CIEBytes)
overridevirtual

Emit a CIE.

Emit a CIE into the debug_frame section.

Implements llvm::DwarfEmitter.

Definition at line 1160 of file DWARFStreamer.cpp.

References llvm::MCStreamer::emitBytes(), llvm::StringRef::size(), and llvm::MCStreamer::switchSection().

◆ emitCompileUnitHeader()

void llvm::DwarfStreamer::emitCompileUnitHeader ( CompileUnit Unit,
unsigned  DwarfVersion 
)
overridevirtual

Emit the compilation unit header for Unit in the debug_info section.

As a side effect, this also switches the current Dwarf version of the MC layer to the one of U.getOrigUnit().

A Dwarf 4 section header is encoded as: uint32_t Unit length (omitting this field) uint16_t Version uint32_t Abbreviation table offset uint8_t Address size Leading to a total of 11 bytes.

A Dwarf 5 section header is encoded as: uint32_t Unit length (omitting this field) uint16_t Version uint8_t Unit type uint8_t Address size uint32_t Abbreviation table offset Leading to a total of 12 bytes.

The start of the unit within its section.

Implements llvm::DwarfEmitter.

Definition at line 162 of file DWARFStreamer.cpp.

References switchToDebugInfoSection().

◆ emitDebugNames()

void llvm::DwarfStreamer::emitDebugNames ( AccelTable< DWARF5AccelTableStaticData > &  Table)
overridevirtual

Emit DWARF debug names.

Implements llvm::DwarfEmitter.

Definition at line 294 of file DWARFStreamer.cpp.

References llvm::emitDWARF5AccelTable().

◆ emitDIE()

void llvm::DwarfStreamer::emitDIE ( DIE Die)
overridevirtual

Recursively emit the DIE tree rooted at Die.

Implements llvm::DwarfEmitter.

Definition at line 206 of file DWARFStreamer.cpp.

References llvm::DIE::getSize(), and llvm::MCStreamer::switchSection().

◆ emitDwarfDebugAddrs()

void llvm::DwarfStreamer::emitDwarfDebugAddrs ( const SmallVector< uint64_t > &  Addrs,
uint8_t  AddrSize 
)
overridevirtual

Emit the addresses described by Addrs into .debug_addr table.

Emit the .debug_addr addresses stored in Addrs.

Implements llvm::DwarfEmitter.

Definition at line 672 of file DWARFStreamer.cpp.

References Addr.

◆ emitDwarfDebugAddrsFooter()

void llvm::DwarfStreamer::emitDwarfDebugAddrsFooter ( const CompileUnit Unit,
MCSymbol EndLabel 
)
overridevirtual

Emit .debug_addr footer.

Implements llvm::DwarfEmitter.

Definition at line 682 of file DWARFStreamer.cpp.

References llvm::MCStreamer::switchSection().

◆ emitDwarfDebugAddrsHeader()

MCSymbol * llvm::DwarfStreamer::emitDwarfDebugAddrsHeader ( const CompileUnit Unit)
overridevirtual

Emit .debug_addr header.

Implements llvm::DwarfEmitter.

Definition at line 642 of file DWARFStreamer.cpp.

References llvm::MCStreamer::switchSection().

◆ emitDwarfDebugArangesTable()

void llvm::DwarfStreamer::emitDwarfDebugArangesTable ( const CompileUnit Unit,
const AddressRanges LinkedRanges 
)
overridevirtual

◆ emitDwarfDebugLocListFooter()

void llvm::DwarfStreamer::emitDwarfDebugLocListFooter ( const CompileUnit Unit,
MCSymbol EndLabel 
)
overridevirtual

Emit debug ranges(.debug_loc, .debug_loclists) footer.

Emit debug locations(.debug_loc, .debug_loclists) footer.

Implements llvm::DwarfEmitter.

Definition at line 589 of file DWARFStreamer.cpp.

References llvm::MCStreamer::switchSection().

◆ emitDwarfDebugLocListFragment()

void llvm::DwarfStreamer::emitDwarfDebugLocListFragment ( const CompileUnit Unit,
const DWARFLocationExpressionsVector LinkedLocationExpression,
PatchLocation  Patch,
DebugDieValuePool AddrPool 
)
overridevirtual

Emit debug ranges(.debug_loc, .debug_loclists) fragment.

Emit debug locations(.debug_loc, .debug_loclists) fragment.

Implements llvm::DwarfEmitter.

Definition at line 575 of file DWARFStreamer.cpp.

◆ emitDwarfDebugLocListHeader()

MCSymbol * llvm::DwarfStreamer::emitDwarfDebugLocListHeader ( const CompileUnit Unit)
overridevirtual

Emit debug locations(.debug_loc, .debug_loclists) header.

Implements llvm::DwarfEmitter.

Definition at line 539 of file DWARFStreamer.cpp.

References llvm::MCStreamer::emitInt16(), llvm::MCStreamer::emitInt32(), llvm::MCStreamer::emitInt8(), and llvm::MCStreamer::switchSection().

◆ emitDwarfDebugRangeListFooter()

void llvm::DwarfStreamer::emitDwarfDebugRangeListFooter ( const CompileUnit Unit,
MCSymbol EndLabel 
)
overridevirtual

Emit debug ranges(.debug_ranges, .debug_rnglists) footer.

Implements llvm::DwarfEmitter.

Definition at line 488 of file DWARFStreamer.cpp.

References llvm::MCStreamer::switchSection().

◆ emitDwarfDebugRangeListFragment()

void llvm::DwarfStreamer::emitDwarfDebugRangeListFragment ( const CompileUnit Unit,
const AddressRanges LinkedRanges,
PatchLocation  Patch,
DebugDieValuePool AddrPool 
)
overridevirtual

Emit debug ranges(.debug_ranges, .debug_rnglists) fragment.

Implements llvm::DwarfEmitter.

Definition at line 477 of file DWARFStreamer.cpp.

◆ emitDwarfDebugRangeListHeader()

MCSymbol * llvm::DwarfStreamer::emitDwarfDebugRangeListHeader ( const CompileUnit Unit)
overridevirtual

Emit debug ranges(.debug_ranges, .debug_rnglists) header.

Implements llvm::DwarfEmitter.

Definition at line 442 of file DWARFStreamer.cpp.

References llvm::MCStreamer::emitInt16(), llvm::MCStreamer::emitInt32(), llvm::MCStreamer::emitInt8(), and llvm::MCStreamer::switchSection().

◆ emitFDE()

void llvm::DwarfStreamer::emitFDE ( uint32_t  CIEOffset,
uint32_t  AddrSize,
uint64_t  Address,
StringRef  FDEBytes 
)
overridevirtual

Emit an FDE with data Bytes.

Emit a FDE into the debug_frame section.

FDEBytes contains the FDE data without the length, CIE offset and address which will be replaced with the parameter values.

Implements llvm::DwarfEmitter.

Definition at line 1170 of file DWARFStreamer.cpp.

References llvm::Address, llvm::MCStreamer::emitBytes(), llvm::MCStreamer::emitIntValue(), llvm::StringRef::size(), and llvm::MCStreamer::switchSection().

◆ emitLineStrings()

void llvm::DwarfStreamer::emitLineStrings ( const NonRelocatableStringpool Pool)
overridevirtual

Emit the string table described by Pool into .debug_line_str table.

Emit the debug_line_str section stored in Pool.

Implements llvm::DwarfEmitter.

Definition at line 283 of file DWARFStreamer.cpp.

References llvm::NonRelocatableStringpool::getEntriesForEmission().

◆ emitLineTableForUnit()

void llvm::DwarfStreamer::emitLineTableForUnit ( const DWARFDebugLine::LineTable LineTable,
const CompileUnit Unit,
OffsetsStringPool DebugStrPool,
OffsetsStringPool DebugLineStrPool 
)
overridevirtual

◆ emitMacroTables()

void llvm::DwarfStreamer::emitMacroTables ( DWARFContext Context,
const Offset2UnitMap UnitMacroMap,
OffsetsStringPool StringPool 
)
overridevirtual

Emit all available macro tables(DWARFv4 and DWARFv5).

Use UnitMacroMap to get compilation unit by macro table offset. Side effects: Fill StringPool with macro strings, update DW_AT_macro_info, DW_AT_macros attributes for corresponding compile units.

Implements llvm::DwarfEmitter.

Definition at line 1181 of file DWARFStreamer.cpp.

References assert(), Context, and llvm::MCStreamer::switchSection().

◆ emitPubNamesForUnit()

void llvm::DwarfStreamer::emitPubNamesForUnit ( const CompileUnit Unit)
overridevirtual

Emit the .debug_pubnames contribution for Unit.

Emit .debug_pubnames for Unit.

Implements llvm::DwarfEmitter.

Definition at line 1148 of file DWARFStreamer.cpp.

◆ emitPubTypesForUnit()

void llvm::DwarfStreamer::emitPubTypesForUnit ( const CompileUnit Unit)
overridevirtual

Emit the .debug_pubtypes contribution for Unit.

Emit .debug_pubtypes for Unit.

Implements llvm::DwarfEmitter.

Definition at line 1154 of file DWARFStreamer.cpp.

◆ emitSectionContents()

void llvm::DwarfStreamer::emitSectionContents ( StringRef  SecData,
StringRef  SecName 
)
overridevirtual

◆ emitStringOffsets()

void llvm::DwarfStreamer::emitStringOffsets ( const SmallVector< uint64_t > &  StringOffset,
uint16_t  TargetDWARFVersion 
)
overridevirtual

Emit the debug string offset table described by StringOffsets into the .debug_str_offsets table.

Implements llvm::DwarfEmitter.

Definition at line 251 of file DWARFStreamer.cpp.

References llvm::MCStreamer::emitInt16(), and llvm::SmallVectorBase< Size_T >::empty().

◆ emitStrings()

void llvm::DwarfStreamer::emitStrings ( const NonRelocatableStringpool Pool)
overridevirtual

Emit the string table described by Pool into .debug_str table.

Emit the debug_str section stored in Pool.

Implements llvm::DwarfEmitter.

Definition at line 238 of file DWARFStreamer.cpp.

References llvm::NonRelocatableStringpool::getEntriesForEmission().

◆ emitSwiftAST()

void llvm::DwarfStreamer::emitSwiftAST ( StringRef  Buffer)
overridevirtual

Emit the swift_ast section stored in Buffer.

Emit the swift_ast section stored in Buffers.

Implements llvm::DwarfEmitter.

Definition at line 350 of file DWARFStreamer.cpp.

References llvm::MCStreamer::emitBytes(), llvm::MCSection::setAlignment(), and llvm::MCStreamer::switchSection().

◆ emitSwiftReflectionSection()

void llvm::DwarfStreamer::emitSwiftReflectionSection ( llvm::binaryformat::Swift5ReflectionSectionKind  ReflSectionKind,
StringRef  Buffer,
uint32_t  Alignment,
uint32_t  Size 
)
overridevirtual

Emit the swift reflection section stored in Buffer.

Implements llvm::DwarfEmitter.

Definition at line 357 of file DWARFStreamer.cpp.

References llvm::MCStreamer::emitBytes(), llvm::MCSection::setAlignment(), and llvm::MCStreamer::switchSection().

◆ finish()

void llvm::DwarfStreamer::finish ( )
overridevirtual

Dump the file to the disk.

Implements llvm::DwarfEmitter.

Definition at line 139 of file DWARFStreamer.cpp.

References llvm::MCStreamer::finish().

◆ getAsmPrinter()

AsmPrinter & llvm::DwarfStreamer::getAsmPrinter ( ) const
inlineoverridevirtual

Returns underlying AsmPrinter.

Implements llvm::DwarfEmitter.

Definition at line 55 of file DWARFStreamer.h.

◆ getDebugAddrSectionSize()

uint64_t llvm::DwarfStreamer::getDebugAddrSectionSize ( ) const
inlineoverridevirtual

Returns size of generated .debug_addr section.

Implements llvm::DwarfEmitter.

Definition at line 202 of file DWARFStreamer.h.

◆ getDebugInfoSectionSize()

uint64_t llvm::DwarfStreamer::getDebugInfoSectionSize ( ) const
inlineoverridevirtual

Returns size of generated .debug_info section.

Implements llvm::DwarfEmitter.

Definition at line 186 of file DWARFStreamer.h.

◆ getDebugMacInfoSectionSize()

uint64_t llvm::DwarfStreamer::getDebugMacInfoSectionSize ( ) const
inlineoverridevirtual

Returns size of generated .debug_macinfo section.

Implements llvm::DwarfEmitter.

Definition at line 190 of file DWARFStreamer.h.

◆ getDebugMacroSectionSize()

uint64_t llvm::DwarfStreamer::getDebugMacroSectionSize ( ) const
inlineoverridevirtual

Returns size of generated .debug_macro section.

Implements llvm::DwarfEmitter.

Definition at line 194 of file DWARFStreamer.h.

◆ getFrameSectionSize()

uint64_t llvm::DwarfStreamer::getFrameSectionSize ( ) const
inlineoverridevirtual

Returns size of generated .debug_frame section.

Implements llvm::DwarfEmitter.

Definition at line 184 of file DWARFStreamer.h.

◆ getLineSectionSize()

uint64_t llvm::DwarfStreamer::getLineSectionSize ( ) const
inlineoverridevirtual

Returns size of generated .debug_line section.

Implements llvm::DwarfEmitter.

Definition at line 150 of file DWARFStreamer.h.

◆ getLocListsSectionSize()

uint64_t llvm::DwarfStreamer::getLocListsSectionSize ( ) const
inlineoverridevirtual

Returns size of generated .debug_loclists section.

Implements llvm::DwarfEmitter.

Definition at line 198 of file DWARFStreamer.h.

◆ getRangesSectionSize()

uint64_t llvm::DwarfStreamer::getRangesSectionSize ( ) const
inlineoverridevirtual

Returns size of generated .debug_ranges section.

Implements llvm::DwarfEmitter.

Definition at line 138 of file DWARFStreamer.h.

◆ getRngListsSectionSize()

uint64_t llvm::DwarfStreamer::getRngListsSectionSize ( ) const
inlineoverridevirtual

Returns size of generated .debug_rnglists section.

Implements llvm::DwarfEmitter.

Definition at line 140 of file DWARFStreamer.h.

◆ init()

Error llvm::DwarfStreamer::init ( Triple  TheTriple,
StringRef  Swift5ReflectionSegmentName 
)

◆ switchToDebugInfoSection()

void llvm::DwarfStreamer::switchToDebugInfoSection ( unsigned  DwarfVersion)

Set the current output section to debug_info and change the MC Dwarf version to DwarfVersion.

Definition at line 141 of file DWARFStreamer.cpp.

References llvm::MCStreamer::switchSection().

Referenced by emitCompileUnitHeader().


The documentation for this class was generated from the following files: