Go to the documentation of this file.
9 #ifndef LLVM_OBJECT_DECOMPRESSOR_H
10 #define LLVM_OBJECT_DECOMPRESSOR_H
30 bool IsLE,
bool Is64Bit);
35 Out.resize(DecompressedSize);
36 return decompress({Out.data(), (
size_t)DecompressedSize});
58 Error consumeCompressedGnuHeader();
59 Error consumeCompressedZLibHeader(
bool Is64Bit,
bool IsLittleEndian);
68 #endif // LLVM_OBJECT_DECOMPRESSOR_H
This is an optimization pass for GlobalISel generic memory operations.
Error decompress(MutableArrayRef< char > Buffer)
Uncompress section data to raw buffer provided.
static bool isCompressed(const object::SectionRef &Section)
Return true if section is compressed, including gnu-styled case.
Tagged union holding either a T or a Error.
Error resizeAndDecompress(T &Out)
Resize the buffer and uncompress section data into it.
This is a value type class that represents a single section in the list of sections in the object fil...
bar al al movzbl eax ret Missed when stored in a memory object
static Expected< Decompressor > create(StringRef Name, StringRef Data, bool IsLE, bool Is64Bit)
Create decompressor object.
static bool isGnuStyle(StringRef Name)
Return true if section name matches gnu style compressed one.
StringRef - Represent a constant reference to a string, i.e.
Lightweight error class with error context and mandatory checking.
uint64_t getDecompressedSize()
Return memory buffer size required for decompression.
Decompressor helps to handle decompression of compressed sections.
static bool isCompressedELFSection(uint64_t Flags, StringRef Name)
Return true if section is a ELF compressed one.