Ray Wang via llvm-dev
2018-Jun-29 15:41 UTC
[llvm-dev] Converting Value* to GenericValue for runFunction?
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/b0f6291d/attachment.html>
Ray Wang via llvm-dev
2018-Jun-29 16:11 UTC
[llvm-dev] Converting Value* to GenericValue for runFunction?
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>