Re: [cfe-users] Help Needed: How to get source line number from .ll file LLVM

2016-07-12 Thread David Blaikie via cfe-users
you would need to build with debug info (-g) or similar (there are a few other options that enable the same source location info) to produce the debuglocs that will tell you about that On Mon, Jul 11, 2016 at 9:40 PM, Shail Dave via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi, > > I am work

[cfe-users] Help Needed: How to get source line number from .ll file LLVM

2016-07-12 Thread Shail Dave via cfe-users
Hi, I am working with LLVM 3.4 and want to obtain the line number information of source file from IR. The IR is generated from simple c code with Clang. *I want to obtain the line number in source c file from the line in IR body.* I tried this - 1. For Instruction BI, unsigned Line = Line =