ΒΆstd::unique_ptr<Module> parseIR(
    llvm::MemoryBufferRef Buffer,
    llvm::SMDiagnostic& Err,
    llvm::LLVMContext& Context,
    bool UpgradeDebugInfo = true,
    llvm::StringRef DataLayoutString = "")

Description

If the given MemoryBuffer 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:55

Parameters

llvm::MemoryBufferRef Buffer
llvm::SMDiagnostic& Err
llvm::LLVMContext& Context
bool UpgradeDebugInfo = true
Run UpgradeDebugInfo, which runs the Verifier. This option should only be set to false by llvm-as for use inside the LLVM testuite!
llvm::StringRef DataLayoutString = ""
Override datalayout in the llvm assembly.