[llvm-dev] Converting Value* to GenericValue for runFunction?

Ray Wang via llvm-dev llvm-dev at lists.llvm.org
Fri Jun 29 09:11:44 PDT 2018

It seems like what I want is `GenericValue
ExecutionEngine::getConstantValue(const Constant *C)`, but this is a
protected function. Is there another proper way to do this?

On Fri, Jun 29, 2018 at 11:41 AM Ray Wang <wangray007 at gmail.com> wrote:

> I have a list of arguments for a CallInst that I would like to pass to
> another compiled LLVM function with execEngine->runFunction(). How can I
> convert all the Values to GenericValues for runFunction?
> Some example arguments are types %struct.CPUARMState*
> %env, %struct.ARMCPRegInfo*, and i64.
> I can use LLVMCreateGenericValueOfPointer for the pointer arguments, but I
> don't know how to convert the i64.
> Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180629/dd381fd7/attachment.html>

More information about the llvm-dev mailing list