LLVM 20.0.0git
|
This class emits DWARF data to the output stream. More...
#include "DWARFLinker/Parallel/DWARFEmitterImpl.h"
Public Member Functions | |
DwarfEmitterImpl (DWARFLinker::OutputFileType OutFileType, raw_pwrite_stream &OutFile) | |
Error | init (Triple TheTriple, StringRef Swift5ReflectionSegmentName) |
Initialize AsmPrinter data. | |
const Triple & | getTargetTriple () |
Returns triple of output stream. | |
void | finish () |
Dump the file to the disk. | |
void | emitAbbrevs (const SmallVector< std::unique_ptr< DIEAbbrev > > &Abbrevs, unsigned DwarfVersion) |
Emit abbreviations. | |
void | emitCompileUnitHeader (DwarfUnit &Unit) |
Emit compile unit header. | |
void | emitDIE (DIE &Die) |
Emit DIE recursively. | |
uint64_t | getDebugInfoSectionSize () const |
Returns size of generated .debug_info section. | |
void | emitDebugNames (DWARF5AccelTable &Table, DebugNamesUnitsOffsets &CUOffsets, CompUnitIDToIdx &UnitIDToIdxMap) |
Emits .debug_names section according to the specified Table . | |
void | emitAppleNames (AccelTable< AppleAccelTableStaticOffsetData > &Table) |
Emits .apple_names section according to the specified Table . | |
void | emitAppleNamespaces (AccelTable< AppleAccelTableStaticOffsetData > &Table) |
Emits .apple_namespaces section according to the specified Table . | |
void | emitAppleObjc (AccelTable< AppleAccelTableStaticOffsetData > &Table) |
Emits .apple_objc section according to the specified Table . | |
void | emitAppleTypes (AccelTable< AppleAccelTableStaticTypeData > &Table) |
Emits .apple_types section according to the specified Table . | |
This class emits DWARF data to the output stream.
It emits already generated section data and specific data, which could not be generated by CompileUnit.
Definition at line 48 of file DWARFEmitterImpl.h.
|
inline |
Definition at line 50 of file DWARFEmitterImpl.h.
void DwarfEmitterImpl::emitAbbrevs | ( | const SmallVector< std::unique_ptr< DIEAbbrev > > & | Abbrevs, |
unsigned | DwarfVersion | ||
) |
Emit abbreviations.
Definition at line 124 of file DWARFEmitterImpl.cpp.
References llvm::MCStreamer::switchSection().
void DwarfEmitterImpl::emitAppleNames | ( | AccelTable< AppleAccelTableStaticOffsetData > & | Table | ) |
Emits .apple_names section according to the specified Table
.
Definition at line 192 of file DWARFEmitterImpl.cpp.
References llvm::emitAppleAccelTable().
void DwarfEmitterImpl::emitAppleNamespaces | ( | AccelTable< AppleAccelTableStaticOffsetData > & | Table | ) |
Emits .apple_namespaces section according to the specified Table
.
Definition at line 184 of file DWARFEmitterImpl.cpp.
References llvm::emitAppleAccelTable().
void DwarfEmitterImpl::emitAppleObjc | ( | AccelTable< AppleAccelTableStaticOffsetData > & | Table | ) |
Emits .apple_objc section according to the specified Table
.
Definition at line 200 of file DWARFEmitterImpl.cpp.
References llvm::emitAppleAccelTable().
void DwarfEmitterImpl::emitAppleTypes | ( | AccelTable< AppleAccelTableStaticTypeData > & | Table | ) |
Emits .apple_types section according to the specified Table
.
Definition at line 208 of file DWARFEmitterImpl.cpp.
References llvm::emitAppleAccelTable().
void DwarfEmitterImpl::emitCompileUnitHeader | ( | DwarfUnit & | Unit | ) |
Emit compile unit header.
Definition at line 132 of file DWARFEmitterImpl.cpp.
References llvm::MCStreamer::switchSection().
void DwarfEmitterImpl::emitDebugNames | ( | DWARF5AccelTable & | Table, |
DebugNamesUnitsOffsets & | CUOffsets, | ||
CompUnitIDToIdx & | UnitIDToIdxMap | ||
) |
Emits .debug_names section according to the specified Table
.
Definition at line 162 of file DWARFEmitterImpl.cpp.
References llvm::DIEInteger::BestForm(), llvm::emitDWARF5AccelTable(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::size().
void DwarfEmitterImpl::emitDIE | ( | DIE & | Die | ) |
Emit DIE recursively.
Definition at line 156 of file DWARFEmitterImpl.cpp.
References llvm::DIE::getSize(), and llvm::MCStreamer::switchSection().
|
inline |
Dump the file to the disk.
Definition at line 61 of file DWARFEmitterImpl.h.
References llvm::MCStreamer::finish().
|
inline |
Returns size of generated .debug_info section.
Definition at line 74 of file DWARFEmitterImpl.h.
Returns triple of output stream.
Definition at line 58 of file DWARFEmitterImpl.h.
Initialize AsmPrinter data.
Definition at line 24 of file DWARFEmitterImpl.cpp.
References llvm::MCTargetOptions::AsmVerbose, llvm::dwarf_linker::DWARFLinkerBase::Assembly, llvm::Target::createAsmPrinter(), llvm::Target::createAsmStreamer(), llvm::Target::createMCAsmBackend(), llvm::Target::createMCAsmInfo(), llvm::Target::createMCCodeEmitter(), llvm::Target::createMCInstPrinter(), llvm::Target::createMCInstrInfo(), llvm::Target::createMCObjectFileInfo(), llvm::Target::createMCObjectStreamer(), llvm::Target::createMCRegInfo(), llvm::Target::createMCSubtargetInfo(), llvm::MCAsmBackend::createObjectWriter(), llvm::createStringError(), llvm::Target::createTargetMachine(), llvm::MCTargetOptions::EnableDwarfDirectory, llvm::Triple::getTriple(), llvm::mc::InitMCTargetOptionsFromFlags(), llvm::TargetRegistry::lookupTarget(), llvm::MCTargetOptions::MCUseDwarfDirectory, llvm::dwarf_linker::DWARFLinkerBase::Object, and llvm::Error::success().