29 #include <system_error> 93 if (std::error_code EC = FileOrErr.
getError())
95 std::unique_ptr<MemoryBuffer> &Buffer = FileOrErr.
get();
101 std::unique_ptr<Binary> &Bin = BinOrErr.
get();
Represents either an error or a value T.
This class represents lattice values for constants.
Microsoft cl.exe's intermediate code file.
ELF dynamically linked shared lib.
StringRef getFileName() const
static Expected< std::unique_ptr< SymbolicFile > > createSymbolicFile(MemoryBufferRef Object, llvm::file_magic Type, LLVMContext *Context)
Windows compiled resource file (.res)
Error takeError()
Take ownership of the stored error.
Mach-O Preloaded Executable.
Expected< std::unique_ptr< Binary > > createBinary(MemoryBufferRef Source, LLVMContext *Context=nullptr)
Create a Binary from Source, autodetecting the file type.
StringRef getBuffer() const
file_magic identify_magic(StringRef magic)
Identify the type of a binary file based on how magical it is.
The Mach-O dynamic linker.
TypeID
Definitions of all of the base types for the Type system.
Tagged union holding either a T or a Error.
ELF Relocatable object file.
MemoryBufferRef getMemoryBufferRef() const
static Expected< std::unique_ptr< WindowsResource > > createWindowsResource(MemoryBufferRef Source)
static Expected< std::unique_ptr< Archive > > create(MemoryBufferRef Source)
Mach-O dSYM companion file.
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.
Error errorCodeToError(std::error_code EC)
Helper for converting an std::error_code to a Error.
std::error_code getError() const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
static Expected< std::unique_ptr< MachOUniversalBinary > > create(MemoryBufferRef Source)
Mach-O dynlinked shared lib.
reference get()
Returns a reference to the stored T value.
StringRef getBufferIdentifier() const
static ErrorOr< std::unique_ptr< MemoryBuffer > > getFileOrSTDIN(const Twine &Filename, int64_t FileSize=-1, bool RequiresNullTerminator=true)
Open the specified file as a MemoryBuffer, or open stdin if the Filename is "-".
Provides ErrorOr<T> smart pointer.
StringRef - Represent a constant reference to a string, i.e.
StringRef getData() const
Windows PDB debug info file.
file_magic - An "enum class" enumeration of file types based on magic (the first N bytes of the file)...