ΒΆint runAsMain(
    int (*)(int, char**) Main,
    ArrayRef<std::string> Args,
    Optional<llvm::StringRef> ProgramName = None)

Description

Run a main function, returning the result. If the optional ProgramName argument is given then it will be inserted before the strings in Args as the first argument to the called function. It is legal to have an empty argument list and no program name, however many main functions will expect a name argument at least, and will fail if none is provided.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/TargetExecutionUtils.h:32

Parameters

int (*)(int, char**) Main
ArrayRef<std::string> Args
Optional<llvm::StringRef> ProgramName = None