Hi all, I am a new user of LLVM~. I want to use LLVM C++ API to generate the LLVM IR.The question is how I can call the C functions in LLVM IR.I did not find the APIs in the documents. For Example: Function *func = Function:Create(...) //create a LLVM function Here is another function I cannot represent with LLVM IR(maybe too complex),so I want to invoke the C function with LLVM IR in func.How can I do it? --Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101213/1969f03d/attachment.html>
Alexander Potapenko
2010-Dec-13 14:37 UTC
[LLVMdev] how to invoke C functions in llvm IR ?
http://wiki.llvm.org/HowTo:_Insert_a_function_call On Mon, Dec 13, 2010 at 5:02 PM, li zhijie <lizhijie86su at gmail.com> wrote:> Hi all, > I am a new user of LLVM~. > I want to use LLVM C++ API to generate the LLVM IR.The question is how I > can call the C functions in LLVM IR.I did not find the APIs in the > documents. > > For Example: > Function *func = Function:Create(...) //create a LLVM function > Here is another function I cannot represent with LLVM IR(maybe too > complex),so I want to invoke the C function with LLVM IR in func.How can I > do it? > > --Thanks > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >