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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Muhui Jiang via llvm-dev
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!

_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

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

Muhui Jiang via llvm-dev
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 <[hidden email]> 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!

_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev