<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.6000.16890" name=GENERATOR>
<STYLE>@font-face {
        font-family: ËÎÌå;
}
@font-face {
        font-family: Verdana;
}
@font-face {
        font-family: @ËÎÌå;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; layout-grid: 15.6pt; }
P.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
LI.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
DIV.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        FONT-WEIGHT: normal; COLOR: windowtext; FONT-STYLE: normal; FONT-FAMILY: Verdana; TEXT-DECORATION: none; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</STYLE>
</HEAD>
<BODY style="MARGIN-TOP: 10px; MARGIN-LEFT: 10px; MARGIN-RIGHT: 10px">
<DIV><FONT face=Verdana color=#0000ff size=2>Hi Duncan,</FONT></DIV>
<DIV><FONT face=Verdana color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#0000ff size=2>But in the doc "Source Level 
Debugging with LLVM", it shows that llvm 2.6 could get column number. There's an 
example in the doc as following: </FONT></DIV>
<DIV><FONT face=Verdana color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#0000ff 
size=2>http://llvm.org/docs/SourceLevelDebugging.html </FONT></DIV>
<DIV><FONT face=Verdana color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#0000ff size=2>
<DIV><FONT color=#e41500>1.  void foo() {</FONT></DIV>
<DIV><FONT 
color=#e41500>2.    int X = 21;</FONT></DIV>
<DIV><FONT 
color=#e41500>3.    int Y = 22;</FONT></DIV>
<DIV><FONT color=#e41500>4.    {</FONT></DIV>
<DIV><FONT 
color=#e41500>5.      int Z = 23;</FONT></DIV>
<DIV><FONT 
color=#e41500>6.      Z = X;</FONT></DIV>
<DIV><FONT color=#e41500>7.    }</FONT></DIV>
<DIV><FONT color=#e41500>8.    X = Y;</FONT></DIV>
<DIV><FONT color=#e41500>9.  }</FONT></DIV></FONT></DIV>
<DIV><FONT face=Verdana color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#0000ff 
size=2>Compiled to LLVM, this function would be represented like this: 
</FONT></DIV>
<DIV><FONT face=Verdana color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#0000ff size=2>
<DIV><FONT 
color=#e41500>define void @foo() nounwind ssp {</FONT></DIV>
<DIV><FONT color=#e41500>entry:</FONT></DIV>
<DIV><FONT 
color=#e41500>  %X = alloca i32, align 4                        ; <i32*> [#uses=4]</FONT></DIV>
<DIV><FONT 
color=#e41500>  %Y = alloca i32, align 4                        ; <i32*> [#uses=4]</FONT></DIV>
<DIV><FONT 
color=#e41500>  %Z = alloca i32, align 4                        ; <i32*> [#uses=3]</FONT></DIV>
<DIV><FONT 
color=#e41500>  %0 = bitcast i32* %X to { }*                    ; <{ }*> [#uses=1]</FONT></DIV>
<DIV><FONT 
color=#e41500>  call void @llvm.dbg.declare({ }* %0, metadata !0), !dbg !7</FONT></DIV>
<DIV><FONT 
color=#e41500>  store i32 21, i32* %X, !dbg !8</FONT></DIV>
<DIV><FONT 
color=#e41500>  %1 = bitcast i32* %Y to { }*                    ; <{ }*> [#uses=1]</FONT></DIV>
<DIV><FONT 
color=#e41500>  call void @llvm.dbg.declare({ }* %1, metadata !9), !dbg !10</FONT></DIV>
<DIV><FONT 
color=#e41500>  store i32 22, i32* %Y, !dbg !11</FONT></DIV>
<DIV><FONT 
color=#e41500>  %2 = bitcast i32* %Z to { }*                    ; <{ }*> [#uses=1]</FONT></DIV>
<DIV><FONT 
color=#e41500>  call void @llvm.dbg.declare({ }* %2, metadata !12), !dbg !14</FONT></DIV>
<DIV><FONT 
color=#e41500>  store i32 23, i32* %Z, !dbg !15</FONT></DIV>
<DIV><FONT 
color=#e41500>  %tmp = load i32* %X, !dbg !16                   ; <i32> [#uses=1]</FONT></DIV>
<DIV><FONT 
color=#e41500>  %tmp1 = load i32* %Y, !dbg !16                  ; <i32> [#uses=1]</FONT></DIV>
<DIV><FONT 
color=#e41500>  %add = add nsw i32 %tmp, %tmp1, !dbg !16        ; <i32> [#uses=1]</FONT></DIV>
<DIV><FONT 
color=#e41500>  store i32 %add, i32* %Z, !dbg !16</FONT></DIV>
<DIV><FONT 
color=#e41500>  %tmp2 = load i32* %Y, !dbg !17                  ; <i32> [#uses=1]</FONT></DIV>
<DIV><FONT 
color=#e41500>  store i32 %tmp2, i32* %X, !dbg !17</FONT></DIV>
<DIV><FONT 
color=#e41500>  ret void, !dbg !18</FONT></DIV>
<DIV><FONT color=#e41500>}</FONT></DIV>
<DIV><FONT color=#e41500></FONT></DIV>
<DIV><FONT 
color=#e41500>declare void @llvm.dbg.declare({ }*, metadata) nounwind readnone</FONT></DIV>
<DIV><FONT color=#e41500></FONT></DIV>
<DIV><FONT 
color=#e41500>!0 = metadata !{i32 459008, metadata !1, metadata !"X", </FONT></DIV>
<DIV><FONT 
color=#e41500>                metadata !3, i32 2, metadata !6}; [ DW_TAG_auto_variable ]</FONT></DIV>
<DIV><FONT 
color=#e41500>!1 = metadata !{i32 458763, metadata !2}; [DW_TAG_lexical_block ]</FONT></DIV>
<DIV><FONT 
color=#e41500>!2 = metadata !{i32 458798, i32 0, metadata !3, metadata !"foo", metadata !"foo", </FONT></DIV>
<DIV><FONT 
color=#e41500>               metadata !"foo", metadata !3, i32 1, metadata !4, </FONT></DIV>
<DIV><FONT 
color=#e41500>               i1 false, i1 true}; [DW_TAG_subprogram ]</FONT></DIV>
<DIV><FONT 
color=#e41500>!3 = metadata !{i32 458769, i32 0, i32 12, metadata !"foo.c", </FONT></DIV>
<DIV><FONT 
color=#e41500>                metadata !"/private/tmp", metadata !"clang 1.1", i1 true, </FONT></DIV>
<DIV><FONT 
color=#e41500>                i1 false, metadata !"", i32 0}; [DW_TAG_compile_unit ]</FONT></DIV>
<DIV><FONT 
color=#e41500>!4 = metadata !{i32 458773, metadata !3, metadata !"", null, i32 0, i64 0, i64 0, </FONT></DIV>
<DIV><FONT 
color=#e41500>                i64 0, i32 0, null, metadata !5, i32 0}; [DW_TAG_subroutine_type ]</FONT></DIV>
<DIV><FONT color=#e41500>!5 = metadata !{null}</FONT></DIV>
<DIV><FONT 
color=#e41500>!6 = metadata !{i32 458788, metadata !3, metadata !"int", metadata !3, i32 0, </FONT></DIV>
<DIV><FONT 
color=#e41500>                i64 32, i64 32, i64 0, i32 0, i32 5}; [DW_TAG_base_type ]</FONT></DIV>
<DIV><FONT 
color=#e41500>!7 = metadata !{i32 2, i32 7, metadata !1, null}</FONT></DIV>
<DIV><FONT 
color=#e41500>!8 = metadata !{i32 2, i32 3, metadata !1, null}</FONT></DIV>
<DIV><FONT 
color=#e41500>!9 = metadata !{i32 459008, metadata !1, metadata !"Y", metadata !3, i32 3, </FONT></DIV>
<DIV><FONT 
color=#e41500>                metadata !6}; [ DW_TAG_auto_variable ]</FONT></DIV>
<DIV><FONT 
color=#e41500>!10 = metadata !{i32 3, i32 7, metadata !1, null}</FONT></DIV>
<DIV><FONT 
color=#e41500>!11 = metadata !{i32 3, i32 3, metadata !1, null}</FONT></DIV>
<DIV><FONT 
color=#e41500>!12 = metadata !{i32 459008, metadata !13, metadata !"Z", metadata !3, i32 5, </FONT></DIV>
<DIV><FONT 
color=#e41500>                 metadata !6}; [ DW_TAG_auto_variable ]</FONT></DIV>
<DIV><FONT 
color=#e41500>!13 = metadata !{i32 458763, metadata !1}; [DW_TAG_lexical_block ]</FONT></DIV>
<DIV><FONT 
color=#e41500>!14 = metadata !{i32 5, i32 9, metadata !13, null}</FONT></DIV>
<DIV><FONT 
color=#e41500>!15 = metadata !{i32 5, i32 5, metadata !13, null}</FONT></DIV>
<DIV><FONT 
color=#e41500>!16 = metadata !{i32 6, i32 5, metadata !13, null}</FONT></DIV>
<DIV><FONT 
color=#e41500>!17 = metadata !{i32 8, i32 3, metadata !1, null}</FONT></DIV>
<DIV><FONT 
color=#e41500>!18 = metadata !{i32 9, i32 1, metadata !2, null}</FONT></DIV></FONT></DIV>
<DIV><FONT face=Verdana color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#0000ff size=2> We tried 
the exactly same C code,  but in our's ll file, all coulmn 
field are 0. I suspect that we missed some options. Please 
advise. Thanks. Here's how we compiled and our ll file: </FONT></DIV>
<DIV><FONT face=Verdana color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#0000ff size=2><FONT 
color=#e41500>llvm-gcc -O0 -g -emit-llvm -c t.c -S -o t.ll</FONT> 
</FONT></DIV>
<DIV><FONT face=Verdana color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#0000ff size=2></FONT> </DIV>
<DIV>
<DIV><FONT 
color=#e41500>define void @main() nounwind {</FONT></DIV>
<DIV><FONT color=#e41500>entry:</FONT></DIV>
<DIV><FONT 
color=#e41500>  %X = alloca i32                                 ; <i32*> [#uses=3]</FONT></DIV>
<DIV><FONT 
color=#e41500>  %Y = alloca i32                                 ; <i32*> [#uses=2]</FONT></DIV>
<DIV><FONT 
color=#e41500>  %Z = alloca i32                                 ; <i32*> [#uses=2]</FONT></DIV>
<DIV><FONT 
color=#e41500>  %"alloca point" = bitcast i32 0 to i32          ; <i32> [#uses=0]</FONT></DIV>
<DIV><FONT 
color=#e41500>  call void @llvm.dbg.declare(metadata !{i32* %X}, metadata !0), !dbg !7</FONT></DIV>
<DIV><FONT 
color=#e41500>  call void @llvm.dbg.declare(metadata !{i32* %Y}, metadata !8), !dbg !7</FONT></DIV>
<DIV><FONT 
color=#e41500>  store i32 21, i32* %X, align 4, !dbg !9</FONT></DIV>
<DIV><FONT 
color=#e41500>  store i32 22, i32* %Y, align 4, !dbg !10</FONT></DIV>
<DIV><FONT 
color=#e41500>  call void @llvm.dbg.declare(metadata !{i32* %Z}, metadata !11), !dbg !13</FONT></DIV>
<DIV><FONT 
color=#e41500>  store i32 23, i32* %Z, align 4, !dbg !14</FONT></DIV>
<DIV><FONT 
color=#e41500>  %0 = load i32* %X, align 4, !dbg !15            ; <i32> [#uses=1]</FONT></DIV>
<DIV><FONT 
color=#e41500>  store i32 %0, i32* %Z, align 4, !dbg !15</FONT></DIV>
<DIV><FONT 
color=#e41500>  %1 = load i32* %Y, align 4, !dbg !16            ; <i32> [#uses=1]</FONT></DIV>
<DIV><FONT 
color=#e41500>  store i32 %1, i32* %X, align 4, !dbg !16</FONT></DIV>
<DIV><FONT 
color=#e41500>  br label %return, !dbg !17</FONT></DIV>
<DIV><FONT color=#e41500></FONT></DIV>
<DIV><FONT 
color=#e41500>return:                                           ; preds = %entry</FONT></DIV>
<DIV><FONT 
color=#e41500>  ret void, !dbg !17</FONT></DIV>
<DIV><FONT color=#e41500>}</FONT></DIV>
<DIV><FONT color=#e41500></FONT></DIV>
<DIV><FONT 
color=#e41500>declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone</FONT></DIV>
<DIV><FONT color=#e41500></FONT></DIV>
<DIV><FONT 
color=#e41500>!0 = metadata !{i32 459008, metadata !1, metadata !"X", metadata !3, i32 2, metadata !6} ; [ DW_TAG_auto_variable ]</FONT></DIV>
<DIV><FONT 
color=#e41500>!1 = metadata !{i32 458763, metadata !2, i32 0, i32 0} ; [ DW_TAG_lexical_block ]</FONT></DIV>
<DIV><FONT 
color=#e41500>!2 = metadata !{i32 458798, i32 0, metadata !3, metadata !"main", metadata !"main", metadata !"main", metadata !3, i32 1, metadata !4, i1 false, i1 true, i32 0, i32 0, null, i1 false} ; [ DW_TAG_subprogram ]</FONT></DIV>
<DIV><FONT 
color=#e41500>!3 = metadata !{i32 458769, i32 0, i32 1, metadata !"t.c", metadata !"/home/kecheng/llvm_test/xyz/", metadata !"4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", i1 true, i1 false, metadata !"", i32 0} ; [ DW_TAG_compile_unit ]</FONT></DIV>
<DIV><FONT 
color=#e41500>!4 = metadata !{i32 458773, metadata !3, metadata !"", metadata !3, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !5, i32 0, null} ; [ DW_TAG_subroutine_type ]</FONT></DIV>
<DIV><FONT color=#e41500>!5 = metadata !{null}</FONT></DIV>
<DIV><FONT 
color=#e41500>!6 = metadata !{i32 458788, metadata !3, metadata !"int", metadata !3, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]</FONT></DIV>
<DIV><FONT 
color=#e41500>!7 = metadata !{i32 1, i32 0, metadata !1, null}</FONT></DIV>
<DIV><FONT 
color=#e41500>!8 = metadata !{i32 459008, metadata !1, metadata !"Y", metadata !3, i32 3, metadata !6} ; [ DW_TAG_auto_variable ]</FONT></DIV>
<DIV><FONT 
color=#e41500>!9 = metadata !{i32 2, i32 0, metadata !1, null}</FONT></DIV>
<DIV><FONT 
color=#e41500>!10 = metadata !{i32 3, i32 0, metadata !1, null}</FONT></DIV>
<DIV><FONT 
color=#e41500>!11 = metadata !{i32 459008, metadata !12, metadata !"Z", metadata !3, i32 5, metadata !6} ; [ DW_TAG_auto_variable ]</FONT></DIV>
<DIV><FONT 
color=#e41500>!12 = metadata !{i32 458763, metadata !1, i32 0, i32 0} ; [ DW_TAG_lexical_block ]</FONT></DIV>
<DIV><FONT 
color=#e41500>!13 = metadata !{i32 3, i32 0, metadata !12, null}</FONT></DIV>
<DIV><FONT 
color=#e41500>!14 = metadata !{i32 5, i32 0, metadata !12, null}</FONT></DIV>
<DIV><FONT 
color=#e41500>!15 = metadata !{i32 6, i32 0, metadata !12, null}</FONT></DIV>
<DIV><FONT 
color=#e41500>!16 = metadata !{i32 8, i32 0, metadata !1, null}</FONT></DIV>
<DIV><FONT 
color=#e41500>!17 = metadata !{i32 9, i32 0, metadata !1, null}</FONT></DIV></DIV>
<DIV><FONT face=Verdana color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV align=left>
<DIV align=left><FONT face=Verdana size=2>
<HR style="WIDTH: 122px; HEIGHT: 2px" SIZE=2>
</FONT></DIV>
<DIV><FONT color=#c0c0c0><FONT face=Verdana 
size=2><SPAN>Kecheng</SPAN></FONT></DIV>
<DIV><FONT face=Verdana size=2>2010-04-26</FONT></FONT></DIV></DIV>
<DIV><FONT face=Verdana size=2>
<HR>
</FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>From£º</STRONG> Duncan 
Sands</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>Date£º</STRONG> 
2010-04-26 05:14:19</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>To£º</STRONG> 
llvmdev</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>Cc£º</STRONG> </FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>Subject£º</STRONG> Re: [LLVMdev] 
Does llvm-gcc emit column # info?</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>
<DIV>Hi Sheng,</DIV>
<DIV></DIV>
<DIV>> I tried llvm-gcc -g -O0 on several cases, but the column field of meta</DIV>
<DIV>> data always shows zero in created ll code.</DIV>
<DIV>></DIV>
<DIV>> Does llvm-gcc emit column # info ? Or I should add some option?</DIV>
<DIV></DIV>
<DIV>as far as I knowm, llvm-gcc doesn't emit column info because it is based on</DIV>
<DIV>gcc-4.2 which has no support for column info.  I think gcc-4.5 has column</DIV>
<DIV>info, so the dragonegg plugin (http://dragonegg.llvm.org) could in theory</DIV>
<DIV>output column info, though it doesn't right now.</DIV>
<DIV></DIV>
<DIV>Ciao,</DIV>
<DIV></DIV>
<DIV>Duncan.</DIV>
<DIV>_______________________________________________</DIV>
<DIV>LLVM Developers mailing list</DIV>
<DIV>LLVMdev@cs.uiuc.edu         http://llvm.cs.uiuc.edu</DIV>
<DIV>http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</DIV></FONT></DIV></BODY></HTML>