10 #ifndef LLVM_OBJECT_DECOMPRESSOR_H 11 #define LLVM_OBJECT_DECOMPRESSOR_H 29 bool IsLE,
bool Is64Bit);
34 Out.resize(DecompressedSize);
57 Error consumeCompressedGnuHeader();
58 Error consumeCompressedZLibHeader(
bool Is64Bit,
bool IsLittleEndian);
61 uint64_t DecompressedSize;
67 #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 Value 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.