[LLVMdev] How to create a CallInst that calls a standard c function like "printf"

Mary_nju miaoyisz at gmail.com
Thu Jan 21 06:51:37 PST 2010



SOS!!!
It is really an emergency problem for me to resolve, if anyone knows the
answer, please let me know, I will 
appreciate it, thank you very much!



Mary_nju wrote:
> 
> 
> I am working on a program based on LLVM. I want to modify the .bc file
> throught C++ APIs provided by LLVM, but I don't know how to create a
> CallInst that calls a standard c function like "printf", can anyone help
> me with this problem?
> 
> The file attached is the program I wrote, it can be compiled, however, the
> result of the dump of the retrieved module is not correct(missing global
> variable and will cause 'program use external function 'myprintf' which
> could not be resolved') problem.
>  http://old.nabble.com/file/p27210247/test.cpp test.cpp 
> 
:-)
-- 
View this message in context: http://old.nabble.com/How-to-create-a-CallInst-that-calls-a-standard-c-function-like-%22printf%22-tp27210247p27258957.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.




More information about the llvm-dev mailing list