|
LLVM 23.0.0git
|
Direct ELF writer for DWP output. More...
#include "llvm/DWP/DWP.h"
Public Member Functions | |
| DWPWriter ()=default | |
| void | setMachine (uint16_t Machine) |
| void | setOSABI (uint8_t OSABI) |
| void | setIsWASM (bool V) |
| SmallVectorImpl< char > & | getSectionBuffer (DWPSectionId Id) |
| void | switchSection (DWPSectionId Id) |
| void | emitBytes (StringRef Data) |
| Zero-copy: stores a reference to the input data without copying. | |
| void | emitIntValue (uint64_t Value, unsigned Size) |
| Error | writeELF (raw_pwrite_stream &OS) |
| Error | writeWASM (raw_pwrite_stream &OS) |
| Error | write (raw_pwrite_stream &OS) |
Direct ELF writer for DWP output.
Section data is stored as zero-copy StringRef chunks pointing to the mmap'd input files, plus an inline buffer for constructed data (emitIntValue). This avoids copying gigabytes of debug section data through the MC infrastructure (MCContext, MCAssembler, MCDataFragment allocation, layout, etc.).
|
default |
|
inline |
Zero-copy: stores a reference to the input data without copying.
Flushes any pending inline data first to preserve output order.
Definition at line 121 of file DWP.h.
References llvm::Data.
Referenced by addAllTypesFromDWP(), addAllTypesFromTypesSection(), llvm::handleSection(), llvm::write(), and llvm::writeStringsAndOffsets().
Definition at line 129 of file DWP.h.
Referenced by llvm::writeIndex(), llvm::writeIndexTable(), writeNewOffsetsTo(), and llvm::writeStringsAndOffsets().
|
inline |
|
inline |
Definition at line 111 of file DWP.h.
Referenced by llvm::write().
|
inline |
|
inline |
Definition at line 110 of file DWP.h.
Referenced by llvm::write().
|
inline |
Definition at line 117 of file DWP.h.
Referenced by addAllTypesFromDWP(), addAllTypesFromTypesSection(), llvm::handleSection(), llvm::write(), llvm::writeIndex(), and llvm::writeStringsAndOffsets().
|
inline |
Definition at line 139 of file DWP.h.
References writeELF(), and writeWASM().
Referenced by llvm::write().
| Error llvm::DWPWriter::writeELF | ( | raw_pwrite_stream & | OS | ) |
Definition at line 1047 of file DWP.cpp.
References llvm::alignTo(), llvm::SmallString< InternalLen >::append(), llvm::Data, llvm::SmallVectorTemplateCommon< T, typename >::data(), llvm::DS_Abbrev, llvm::DS_CUIndex, llvm::DS_Info, llvm::DS_Line, llvm::DS_Loc, llvm::DS_Loclists, llvm::DS_Macro, llvm::DS_Rnglists, llvm::DS_Str, llvm::DS_StrOffsets, llvm::DS_TUIndex, llvm::DS_Types, llvm::little, llvm::Offset, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::ELF::SHF_EXCLUDE, llvm::ELF::SHF_MERGE, llvm::ELF::SHF_STRINGS, llvm::ELF::SHT_NULL, llvm::ELF::SHT_PROGBITS, llvm::ELF::SHT_STRTAB, llvm::ELF::SHT_SYMTAB, llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::Error::success(), llvm::raw_ostream::write(), llvm::raw_ostream::write_zeros(), llvm::ELF::writeHeader(), and llvm::ELF::writeSectionHeader().
Referenced by write().
| Error llvm::DWPWriter::writeWASM | ( | raw_pwrite_stream & | OS | ) |
Definition at line 1180 of file DWP.cpp.
References llvm::DS_Abbrev, llvm::DS_CUIndex, llvm::DS_Info, llvm::DS_Line, llvm::DS_Loc, llvm::DS_Loclists, llvm::DS_Macro, llvm::DS_Rnglists, llvm::DS_Str, llvm::DS_StrOffsets, llvm::DS_TUIndex, llvm::DS_Types, llvm::encodeULEB128(), llvm::Error::success(), llvm::Version, and llvm::raw_ostream::write().
Referenced by write().