70 std::deque<SmallVector<char, 0>> OwnedBuffers;
74 if (!Buffer.
empty()) {
75 OwnedBuffers.push_back(std::move(Buffer));
76 auto &
B = OwnedBuffers.back();
84 for (
auto &
C : Chunks)
90 bool empty()
const {
return Chunks.empty() && Buffer.
empty(); }
93 for (
auto &
C : Chunks)
114 return Sections[Id].Buffer;
123 auto &SD = Sections[CurrentSection];
125 SD.Chunks.push_back(
Data);
130 auto &Buf = Sections[CurrentSection].Buffer;
131 for (
unsigned I = 0;
I <
Size; ++
I) {
132 Buf.push_back(
static_cast<char>(
Value & 0xff));
153 assert(strlen(Str) + 1 ==
Length &&
"Ensure length hint is correct");
156 auto Pair = Pool.insert(std::make_pair(
Key, Offset));
162 return Pair.first->second;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
This file implements a map that provides insertion order iteration.
Function const char TargetMachine * Machine
This file defines the SmallVector class.
Represent a constant reference to an array (0 or more elements consecutively in memory),...
uint64_t getOffset(const char *Str, unsigned Length)
DWPStringPool(DWPWriter &Out)
Direct ELF writer for DWP output.
void switchSection(DWPSectionId Id)
Error write(raw_pwrite_stream &OS)
Error writeWASM(raw_pwrite_stream &OS)
void setMachine(uint16_t Machine)
Error writeELF(raw_pwrite_stream &OS)
void setOSABI(uint8_t OSABI)
void emitBytes(StringRef Data)
Zero-copy: stores a reference to the input data without copying.
void emitIntValue(uint64_t Value, unsigned Size)
SmallVectorImpl< char > & getSectionBuffer(DWPSectionId Id)
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
pointer data()
Return a pointer to the vector's buffer, even if empty().
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Represent a constant reference to a string, i.e.
LLVM Value Representation.
This class is the base class for all object file types.
This class implements an extremely fast bulk output stream that can only output to a stream.
raw_ostream & write(unsigned char C)
An abstract base class for streams implementations that also support a pwrite operation.
@ C
The default llvm calling convention, compatible with C.
DwarfFormat
Constants that define the DWARF format as 32 or 64 bit.
This is an optimization pass for GlobalISel generic memory operations.
std::vector< std::pair< DWARFSectionKind, uint32_t > > SectionLengths
LLVM_ATTRIBUTE_VISIBILITY_DEFAULT AnalysisKey InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key
FunctionAddr VTableAddr uintptr_t uintptr_t Data
LLVM_ABI Expected< InfoSectionUnitHeader > parseInfoSectionUnitHeader(StringRef Info)
DWPSectionId
Section identifiers for DWP output.
Dwarf64StrOffsetsPromotion
@ Enabled
Convert any .debug_str_offsets tables to DWARF64 if needed.
@ Always
Always emit .debug_str_offsets talbes as DWARF64 for testing.
@ Disabled
Don't do any conversion of .debug_str_offsets tables.
LLVM_ABI Error write(DWPWriter &Out, ArrayRef< std::string > Inputs, OnCuIndexOverflow OverflowOptValue, Dwarf64StrOffsetsPromotion StrOffsetsOptValue, raw_pwrite_stream *OS=nullptr)
DWARFUnitIndex::Entry::SectionContribution Contributions[8]