9 #ifndef LLVM_OBJECT_DECOMPRESSOR_H 10 #define LLVM_OBJECT_DECOMPRESSOR_H 28 bool IsLE,
bool Is64Bit);
33 Out.resize(DecompressedSize);
56 Error consumeCompressedGnuHeader();
57 Error consumeCompressedZLibHeader(
bool Is64Bit,
bool IsLittleEndian);
60 uint64_t DecompressedSize;
66 #endif // LLVM_OBJECT_DECOMPRESSOR_H static bool isCompressed(const object::SectionRef &Section)
Return true if section is compressed, including gnu-styled case.
static bool isGnuStyle(StringRef Name)
Return true if section name matches gnu style compressed one.
This class represents lattice values for constants.
Error resizeAndDecompress(T &Out)
Resize the buffer and uncompress section data into it.
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
Decompressor helps to handle decompression of compressed sections.
uint64_t getDecompressedSize()
Return memory buffer size required for decompression.
Tagged union holding either a T or a Error.
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
Error decompress(MutableArrayRef< char > Buffer)
Uncompress section data to raw buffer provided.
Lightweight error class with error context and mandatory checking.
StringRef - Represent a constant reference to a string, i.e.
static bool isCompressedELFSection(uint64_t Flags, StringRef Name)
Return true if section is a ELF compressed one.
This is a value type class that represents a single section in the list of sections in the object fil...
static Expected< Decompressor > create(StringRef Name, StringRef Data, bool IsLE, bool Is64Bit)
Create decompressor object.