[LLVMdev] inserting a print statement into IR

Duncan Sands baldrick at free.fr
Mon Apr 4 23:40:11 PDT 2011


Hi George,

>    I am trying to construct the print statement : printf("value:%d\n", value);
> This is my llvm code. It is seg faulting at builder.CreateGlobalStringPtr(str,"").

please build LLVM with assertions enabled (configure with --enable-assertions) 
and try again.  When assertions are enabled failures are usually much less
obscure.

Ciao, Duncan.



More information about the llvm-dev mailing list