ΒΆstd::unique_ptr<MIRParser>
createMIRParserFromFile(
    llvm::StringRef Filename,
    llvm::SMDiagnostic& Error,
    llvm::LLVMContext& Context,
    std::function<void(Function&)>
        ProcessIRFunction = nullptr)

Description

This function is the main interface to the MIR serialization format parser. It reads in a MIR file and returns a MIR parser that can parse the embedded LLVM IR module and initialize the machine functions by parsing the machine function's state.

Declared at: llvm/include/llvm/CodeGen/MIRParser/MIRParser.h:66

Parameters

llvm::StringRef Filename
- The name of the file to parse.
llvm::SMDiagnostic& Error
- Error result info.
llvm::LLVMContext& Context
- Context which will be used for the parsed LLVM IR module.
std::function<void(Function&)> ProcessIRFunction = nullptr
- function to run on every IR function or stub loaded from the MIR file.