This function is another interface to the MIR serialization format parser.
Declared in <llvm/CodeGen/MIRParser/MIRParser.h>
std::unique_ptr<MIRParser>
createMIRParser(
std::unique_ptr<MemoryBuffer> Contents,
LLVMContext& Context,
std::function<void(Function&)> ProcessIRFunction = nullptr);
It returns a MIR parser that works with the given memory buffer and that can parse the embedded LLVM IR module and initialize the machine functions by parsing the machine function's state.
A MIR parser for the given buffer.
| Name | Description |
|---|---|
| Contents | - The MemoryBuffer containing the machine level IR. |
| Context | - Context which will be used for the parsed LLVM IR module. |
| ProcessIRFunction | - function to run on every IR function or stub loaded from the MIR file. |