[cfe-dev] LLVM IR Question

Kyle Girard kyle at kdmanalytics.com
Fri Jun 11 10:18:40 PDT 2010


I've just stumbled upon clang and have been reading the documentation
and such and I have a couple of questions that I'm hoping someone can
answer and save me some time.  

I am playing around with converting C/C++ files into a format that is
very similar to the LLVM IR output however I still need some information
that I believe is only found in the AST.  Can clang give me the ability
to iterate through the LLVM IR statements and still reference original
source lines in the AST?  

If that is possible how exactly do I access this information?  I've
looked at the clang-interpreter example and it would be similar to what
I thought of doing just the my interpreter would output my type of file.

Do I have to create my own CodeGenAction or something else?  I've only
just started to look at the code.

Thanks,

Kyle







More information about the cfe-dev mailing list