ΒΆllvm::Constant* parseConstantValue(
    llvm::StringRef Asm,
    llvm::SMDiagnostic& Err,
    const llvm::Module& M,
    const llvm::SlotMapping* Slots = nullptr)

Description

Parse a type and a constant value in the given string. The constant value can be any LLVM constant, including a constant expression.

Declared at: llvm/include/llvm/AsmParser/Parser.h:168

Parameters

llvm::StringRef Asm
llvm::SMDiagnostic& Err
const llvm::Module& M
const llvm::SlotMapping* Slots = nullptr
The optional slot mapping that will restore the parsing state of the module.

Returns

null on error.