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)
105 bool IsLittleEndian =
true;
116 return Sections[Id].Buffer;
125 auto &SD = Sections[CurrentSection];
127 SD.Chunks.push_back(
Data);
132 auto &Buf = Sections[CurrentSection].Buffer;
133 if (IsLittleEndian) {
134 for (
unsigned I = 0;
I <
Size; ++
I) {
135 Buf.push_back(
static_cast<char>(
Value & 0xff));
139 for (
unsigned I = 0;
I <
Size; ++
I) {
141 static_cast<char>((
Value >> (8 * (
Size - 1 -
I))) & 0xff));
162 assert(strlen(Str) + 1 ==
Length &&
"Ensure length hint is correct");
165 auto Pair = Pool.insert(std::make_pair(
Key, Offset));
171 return Pair.first->second;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
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 setIsLittleEndian(bool V)
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.
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
LLVM_ABI Expected< InfoSectionUnitHeader > parseInfoSectionUnitHeader(StringRef Info, bool IsLittleEndian)
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]