ΒΆstd::unique_ptr<Module> parseIRFile(
    llvm::StringRef Filename,
    llvm::SMDiagnostic& Err,
    llvm::LLVMContext& Context,
    llvm::DataLayoutCallbackTy
        DataLayoutCallback =
            [](llvm::StringRef) { return None; })

Description

If the given file holds a bitcode image, return a Module for it. Otherwise, attempt to parse it as LLVM Assembly and return a Module for it.

Declared at: llvm/include/llvm/IRReader/IRReader.h:65

Parameters

llvm::StringRef Filename
llvm::SMDiagnostic& Err
llvm::LLVMContext& Context
llvm::DataLayoutCallbackTy DataLayoutCallback = [](llvm::StringRef) { return None; }
Override datalayout in the llvm assembly.