[llvm] r174785 - Dwarf: do not use line_table_start in at_stmt_list since we do not always emit

Eric Christopher echristo at gmail.com
Fri Feb 8 17:08:49 PST 2013


+  // The line table entries are not always emitted in assembly, so it
> +  // is not okay to use line_table_start here.
>    if (Asm->MAI->doesDwarfUseRelocationsAcrossSections())
>      NewCU->addLabel(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4,
> -                    LineTableStartSym);
> +                    NewCU->getUniqueID() == 0 ?
> +                    Asm->GetTempSymbol("section_line") :
> LineTableStartSym);
>

This is why I was worried about always conditionalizing on ID 0, is there
some way we can avoid this?

Also, there's a cached symbol for the beginning of the section. Please use
it as it is a few lines below :)

-eric


>    else if (NewCU->getUniqueID() == 0)
>      NewCU->addUInt(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4, 0);
>    else
>
> Modified: llvm/trunk/test/DebugInfo/X86/stmt-list.ll
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/stmt-list.ll?rev=174785&r1=174784&r2=174785&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/DebugInfo/X86/stmt-list.ll (original)
> +++ llvm/trunk/test/DebugInfo/X86/stmt-list.ll Fri Feb  8 18:41:44 2013
> @@ -3,7 +3,7 @@
>  ; CHECK:      .section        .debug_line,"", at progbits
>  ; CHECK-NEXT: .Lsection_line:
>
> -; CHECK:      .long .Lline_table_start0 # DW_AT_stmt_list
> +; CHECK:      .long   .Lsection_line          # DW_AT_stmt_list
>
>  define void @f() {
>  entry:
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130208/3296d442/attachment.html>


More information about the llvm-commits mailing list