[#llvm-createMIRParserFromFile] = xref:llvm.adoc[llvm]::createMIRParserFromFile :relfileprefix: ../ :mrdocs: This function is the main interface to the MIR serialization format parser. == Synopsis Declared in `<llvm/CodeGen/MIRParser/MIRParser.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::unique_ptr<MIRParser> createMIRParserFromFile( xref:llvm/StringRef.adoc[StringRef] Filename, xref:llvm/SMDiagnostic.adoc[SMDiagnostic]& Error, xref:llvm/LLVMContext.adoc[LLVMContext]& Context, std::function<void(xref:llvm/Function.adoc[Function]&)> ProcessIRFunction = nullptr); ---- == Description 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. == Return Value A MIR parser for the file, or nullptr if a parsing error occurred. == Parameters [cols="1,4"] |=== | Name| Description | *Filename* | ‐ The name of the file to parse. | *Error* | ‐ Error result info. | *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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#