26 using namespace object;
80 if (std::error_code EC = FileOrErr.
getError())
82 std::unique_ptr<MemoryBuffer> &Buffer = FileOrErr.
get();
86 if (std::error_code EC = BinOrErr.
getError())
88 std::unique_ptr<Binary> &Bin = BinOrErr.
get();
std::error_code getError() const
Represents either an error or a value T.
Mach-O dynlinked shared lib.
ELF Relocatable object file.
static ErrorOr< std::unique_ptr< SymbolicFile > > createSymbolicFile(MemoryBufferRef Object, sys::fs::file_magic Type, LLVMContext *Context)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
StringRef getData() const
TypeID
Definitions of all of the base types for the Type system.
ELF dynamically linked shared lib.
MemoryBufferRef getMemoryBufferRef() const
Windows compiled resource file (.rc)
ErrorOr< std::unique_ptr< Binary > > createBinary(MemoryBufferRef Source, LLVMContext *Context=nullptr)
Create a Binary from Source, autodetecting the file type.
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important class for using LLVM in a threaded context.
Mach-O Preloaded Executable.
static ErrorOr< std::unique_ptr< MachOUniversalBinary > > create(MemoryBufferRef Source)
StringRef getFileName() const
file_magic identify_magic(StringRef magic)
Identify the type of a binary file based on how magical it is.
static ErrorOr< std::unique_ptr< MemoryBuffer > > getFileOrSTDIN(const Twine &Filename, int64_t FileSize=-1)
Open the specified file as a MemoryBuffer, or open stdin if the Filename is "-".
StringRef getBuffer() const
static ErrorOr< std::unique_ptr< Archive > > create(MemoryBufferRef Source)
file_magic - An "enum class" enumeration of file types based on magic (the first N bytes of the file)...
Mach-O dSYM companion file.
The Mach-O dynamic linker.
StringRef getBufferIdentifier() const
StringRef - Represent a constant reference to a string, i.e.