|
LLVM 24.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) |
| void | setIsLittleEndian (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 128 of file DWP.h.
References llvm::Data.
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 153 of file DWP.h.
References writeELF(), and writeWASM().
| Error llvm::DWPWriter::writeELF | ( | raw_pwrite_stream & | OS | ) |
Definition at line 1076 of file DWP.cpp.
References llvm::alignTo(), llvm::SmallString< InternalLen >::append(), llvm::big, 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, Size, 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 1211 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().