Go to the documentation of this file.
21 bool IsLE,
bool Is64Bit) {
23 if (
Error Err =
D.consumeCompressedHeader(Is64Bit, IsLE))
28 Decompressor::Decompressor(
StringRef Data)
29 : SectionData(
Data), DecompressedSize(0) {}
31 Error Decompressor::consumeCompressedHeader(
bool Is64Bit,
bool IsLittleEndian) {
33 uint64_t HdrSize = Is64Bit ?
sizeof(Elf64_Chdr) :
sizeof(Elf32_Chdr);
34 if (SectionData.size() < HdrSize)
35 return createError(
"corrupted compressed section header");
39 auto ChType = Extractor.getUnsigned(&Offset, Is64Bit ?
sizeof(
Elf64_Word)
59 DecompressedSize = Extractor.getUnsigned(
61 SectionData = SectionData.substr(HdrSize);
67 arrayRefFromStringRef(SectionData),
68 Output.
data(), Output.size());
This is an optimization pass for GlobalISel generic memory operations.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
bar al al movzbl eax ret Missed when stored in a memory object
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
Error decompress(MutableArrayRef< uint8_t > Output)
Uncompress section data to raw buffer provided.
StringRef - Represent a constant reference to a string, i.e.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Lightweight error class with error context and mandatory checking.
const char * getReasonIfUnsupported(Format F)
Format formatFor(DebugCompressionType Type)
Error createError(const Twine &Err)
Error decompress(DebugCompressionType T, ArrayRef< uint8_t > Input, uint8_t *Output, size_t UncompressedSize)
Decompressor helps to handle decompression of compressed sections.