[cfe-dev] How to emit a "printf" call into LLVM IR representation code
Eric Christopher
echristo at apple.com
Wed May 19 01:50:19 PDT 2010
On May 19, 2010, at 1:24 AM, peng li wrote:
> Any hint is highly appreciated!
The easiest way might be to use llvm-gcc and have it emit llvm IR for your sample code. This works for just about anything.
That said in your case what you want appears to be a non-varargs version of printf. In this case you'd need to create a special "printf" that only took the two arguments you want and then call it.
I'm not sure why you're doing this so much more is a bit difficult since I'd be guessing.
-eric
More information about the cfe-dev
mailing list