Abhinash Jain
2013-Jul-25 16:07 UTC
[LLVMdev] Passing String to an external function in llvm
Hi All, On my llvm pass I have some variable named "expr" which is being declared as :- string expr; // or char *expr; // Now I want to pass this "expr" to some external function. How can I do this?? 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.
David Blaikie
2013-Jul-25 16:25 UTC
[LLVMdev] Passing String to an external function in llvm
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
Abhinash Jain
2013-Jul-25 17:12 UTC
[LLVMdev] Passing String to an external function in llvm
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??? 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.
Reasonably Related Threads
- [LLVMdev] Passing String to an external function in llvm
- [LLVMdev] Passing String to an external function in llvm
- [LLVMdev] Passing String to an external function in llvm
- [LLVMdev] Passing String to an external function in llvm
- [LLVMdev] Passing String to an external function in llvm