[LLVMdev] Source file information.

Sanjiv.Gupta at microchip.com Sanjiv.Gupta at microchip.com
Wed Jul 8 23:37:50 PDT 2009

> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> Behalf Of Saman Aliari Zonouz
> Sent: Thursday, July 09, 2009 11:44 AM
> To: llvmdev at cs.uiuc.edu
> Subject: [LLVMdev] Source file information.
> Hi,
> I am new to LLVM, and need to find the line number and cpp source file
> name for each instruction in a .bc file. I suppose llvm debugger might
> have that feature but there is no documentation on it. Would you
> give me some help how to do it?
Compile the original .cpp file with clang -g option.
The file/line is maintained in SDNodes with DebugLoc field.

- Sanjiv

> Thanks,
> ::Saman Zonouz
> University of Illinois

More information about the llvm-dev mailing list