<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18854"></HEAD>
<BODY 
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=984170820-29032010>Hi all,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=984170820-29032010></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=984170820-29032010>Thanks for all the help. I have successfully manage to 
create the debug info (using -g option in clang) and tap into it using llvm API 
(using DebugInfo.h). I am now able to print out the source line number for each 
llvm instruction.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=984170820-29032010></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=984170820-29032010>Thanks</SPAN></FONT></DIV>
<DIV align=left><FONT size=2 face=Arial>Best Regards</FONT></DIV>
<DIV align=left><FONT size=2 face=Arial>Arvind</FONT></DIV>
<DIV align=left><FONT size=2 
face=Arial>------------------------------------------------------------------------------------<BR>Arvind 
Sudarsanam                    
Phone:  (435) 512-7769<BR>CPU Technology, 
Inc                  
Fax:    (866) 848-5599<BR>1500 Kansas Ave, Suite 3E<BR>Longmont, 
CO  80501<BR></FONT></DIV>
<DIV> </DIV><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> Chris Lattner [mailto:clattner@apple.com] 
<BR><B>Sent:</B> Monday, March 29, 2010 10:48 AM<BR><B>To:</B> Arvind 
Sudarsanam<BR><B>Cc:</B> cfe-dev@cs.uiuc.edu<BR><B>Subject:</B> Re: [cfe-dev] 
source code information in LLVM IR<BR></FONT><BR></DIV>
<DIV></DIV><BR>
<DIV>
<DIV>On Mar 25, 2010, at 2:56 PM, Arvind Sudarsanam wrote:</DIV><BR 
class=Apple-interchange-newline>
<BLOCKQUOTE type="cite">
  <DIV>
  <DIV dir=ltr align=left> </DIV>
  <DIV></DIV>
  <DIV><FONT size=2 face=Arial>Hi,</FONT></DIV>
  <DIV> </DIV>
  <DIV><FONT size=2 face=Arial>I am generating llvm IR code for C source code 
  using clang as the<BR>front end. I am wondering if there is any way of mapping 
  an llvm IR<BR>line number back to its C source code line number.</FONT></DIV>
  <DIV> </DIV></DIV></BLOCKQUOTE><BR></DIV>
<DIV>Hi Arvind,</DIV>
<DIV><BR></DIV>
<DIV>This is a frequently asked question on the llvmdev list, please search the 
mailing list archives (e.g. on gmane) for responses.</DIV>
<DIV><BR></DIV>
<DIV>-Chris</DIV><BR></BODY></HTML>