[LLVMdev] Passing String to an external function in llvm

David Blaikie dblaikie at gmail.com
Thu Jul 25 09:25:06 PDT 2013


On Thu, Jul 25, 2013 at 9:07 AM, Abhinash Jain <omnia at mailinator.com> wrote:
> Hi All,
>
> On my llvm pass I have some variable named "expr" which is being declared as
> :-
> string expr;      // or  char  *expr; //

I don't understand this question - these are C++ declarations, not
LLVM declarations (not to mention LLVM IR doesn't have "variables", as
such). So what's the actual LLVM entity you're dealing with?

> Now I want to pass this "expr" to some external function.
> How can I do this??

Have you tried compiling some code with Clang to see what IR it
produces for different types, calls, and passing?

>
> Similarly, How can I pass variable "var" to an external function which is
> being decalred as :-
> Vector<int> var;
>
> Any help will be appreciated..............
>
>
>
> --
> View this message in context: http://llvm.1065342.n5.nabble.com/Passing-String-to-an-external-function-in-llvm-tp59798.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