9#ifndef LLVM_OBJECT_DECOMPRESSOR_H
10#define LLVM_OBJECT_DECOMPRESSOR_H
29 bool IsLE,
bool Is64Bit);
34 Out.resize(DecompressedSize);
35 return decompress({(uint8_t *)Out.data(), (size_t)DecompressedSize});
47 Error consumeCompressedHeader(
bool Is64Bit,
bool IsLittleEndian);
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
StringRef - Represent a constant reference to a string, i.e.
Decompressor helps to handle decompression of compressed sections.
Error resizeAndDecompress(T &Out)
Resize the buffer and uncompress section data into it.
uint64_t getDecompressedSize()
Return memory buffer size required for decompression.
Error decompress(MutableArrayRef< uint8_t > Output)
Uncompress section data to raw buffer provided.
static Expected< Decompressor > create(StringRef Name, StringRef Data, bool IsLE, bool Is64Bit)
Create decompressor object.
This is an optimization pass for GlobalISel generic memory operations.