[LLVMdev] source code information in LLVM IR

Eric Christopher echristo at apple.com
Thu Mar 25 15:09:50 PDT 2010


On Mar 25, 2010, at 2:55 PM, Arvind Sudarsanam wrote:

> Hi,
>  
> I am generating llvm IR code for C source code using clang as the
> front end. I am wondering if there is any way of mapping an llvm IR
> line number back to its C source code line number.
>  

You could use something like:

http://llvm.org/docs/LangRef.html#int_annotation

and just make a lot of it blank.  You could also look and see what clang does for line number debug information.

-eric





More information about the llvm-dev mailing list