[LLVMdev] Passing String to an external function in llvm

David Blaikie dblaikie at gmail.com
Thu Jul 25 10:36:32 PDT 2013


On Thu, Jul 25, 2013 at 10:12 AM, Abhinash Jain <omnia at mailinator.com> wrote:
> I did some computation through llvm pass, and store those computed values on
> string.  eg. :-
>
> stringstream lhs;
> lhs << instr->getOperand(1);   //  'instr' is some instruction
> string lhsvar=lhs.str();
>
> Now I want to pass this 'lhsvar' to the external function, so how can i do
> this???

Why are you storing this in a string at all - just use the operand
itself, it will be the LLVM Value you want to pass to the function.

>
> This is just the part of a code to make you understand. if you say I can
> even provide the link to the code.
>
>
>
>
>
>
>
> --
> View this message in context: http://llvm.1065342.n5.nabble.com/Passing-String-to-an-external-function-in-llvm-tp59798p59803.html
> Sent from the LLVM - Dev mailing list archive at Nabble.com.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



More information about the llvm-dev mailing list