[LLVMdev] IR Line Number

Beckert Frey beckert.frey at yahoo.com
Mon Mar 31 16:07:38 PDT 2014


Hi Tim, 

it worked perfectly. 


Thank you.


On Friday, March 28, 2014 3:52 AM, Tim Northover <t.p.northover at gmail.com> wrote:
 
Hi,


> I'm debugging an analysis pass and it would help a lot if I could exactly
> identify which instruction I'm outputting information about on the screen.

Usually there's no concept of line number in the in-memory data
structures (.bc is equally valid input and doesn't have lines).

If you run the "debug-ir" pass before yours it'll add Dwarf info to
each instruction, which describes what you want. You can then access
it with Instruction::getDebugLoc.

Cheers.

Tim.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140331/9136455d/attachment.html>


More information about the llvm-dev mailing list