Create a Binary by reading the file at Path, autodetecting its type.
Declared in <llvm/Object/Binary.h>
Expected<OwningBinary<Binary>>
createBinary(
StringRef Path,
LLVMContext* Context = nullptr,
bool InitContent = true);
An OwningBinary wrapping the created Binary, or an error.
| Name | Description |
|---|---|
| Path | Path to the file to read. |
| Context | Optional LLVM IR context used when the file is bitcode; may be null. |
| InitContent | If true, run format-specific content initialization. |