[llvm] r202333 - If we're only emitting line tables for a particular CU then don't add
Eric Christopher
echristo at gmail.com
Wed Feb 26 23:51:29 PST 2014
On Wed, Feb 26, 2014 at 11:08 PM, Eric Christopher <echristo at gmail.com> wrote:
>> Do we have a committed negative test? (If I remove "if
>> (getCUNode().getEmissionKind() == DIBuilder::FullDebug)" does some
>> test fail? does that test have the "i32 0" in it? or is the old schema
>> somehow parsing as limited debug info mode?)
>>
>
> Yeah, I don't. The existing test changes were required because of some
> weird lack of verification problem I'm guessing (something initialized
> to zero maybe? I'm very interested in the reply to your other message)
> in that we won't produce the ranges by default without. I should dupe
> and commit a test that is a "positive negative" though.
>
r202357 and proving that more testcases are always good I've committed
a fix there where we were terminating a list even if there weren't any
ranges output for the CU.
-eric
> -eric
>
>
>>>
>>> Modified:
>>> llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.h
>>> llvm/trunk/test/DebugInfo/X86/cu-ranges-odr.ll
>>> llvm/trunk/test/DebugInfo/X86/cu-ranges.ll
>>> llvm/trunk/test/DebugInfo/X86/stmt-list-multiple-compile-units.ll
>>> llvm/trunk/test/DebugInfo/cu-ranges.ll
>>>
>>> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.h
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.h?rev=202333&r1=202332&r2=202333&view=diff
>>> ==============================================================================
>>> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.h (original)
>>> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.h Wed Feb 26 19:25:00 2014
>>> @@ -21,6 +21,7 @@
>>> #include "llvm/ADT/OwningPtr.h"
>>> #include "llvm/ADT/StringMap.h"
>>> #include "llvm/DebugInfo.h"
>>> +#include "llvm/DIBuilder.h"
>>> #include "llvm/MC/MCExpr.h"
>>> #include "llvm/MC/MCSection.h"
>>>
>>> @@ -249,7 +250,11 @@ public:
>>> bool hasContent() const { return !UnitDie->getChildren().empty(); }
>>>
>>> /// addRange - Add an address range to the list of ranges for this unit.
>>> - void addRange(RangeSpan Range) { CURanges.push_back(Range); }
>>> + void addRange(RangeSpan Range) {
>>> + // Only add a range for this unit if we're emitting full debug.
>>> + if (getCUNode().getEmissionKind() == DIBuilder::FullDebug)
>>> + CURanges.push_back(Range);
>>> + }
>>>
>>> /// getRanges - Get the list of ranges for this unit.
>>> const SmallVectorImpl<RangeSpan> &getRanges() const { return CURanges; }
>>>
>>> Modified: llvm/trunk/test/DebugInfo/X86/cu-ranges-odr.ll
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/cu-ranges-odr.ll?rev=202333&r1=202332&r2=202333&view=diff
>>> ==============================================================================
>>> --- llvm/trunk/test/DebugInfo/X86/cu-ranges-odr.ll (original)
>>> +++ llvm/trunk/test/DebugInfo/X86/cu-ranges-odr.ll Wed Feb 26 19:25:00 2014
>>> @@ -61,7 +61,7 @@ attributes #1 = { nounwind readnone }
>>> !llvm.module.flags = !{!23, !24}
>>> !llvm.ident = !{!25}
>>>
>>> -!0 = metadata !{i32 786449, metadata !1, i32 4, metadata !"clang version 3.5 (trunk 199923) (llvm/trunk 199940)", i1 false, metadata !"", i32 0, metadata !2, metadata !3, metadata !13, metadata !21, metadata !2, metadata !""} ; [ DW_TAG_compile_unit ] [/usr/local/google/home/echristo/tmp/baz.cpp] [DW_LANG_C_plus_plus]
>>> +!0 = metadata !{i32 786449, metadata !1, i32 4, metadata !"clang version 3.5 (trunk 199923) (llvm/trunk 199940)", i1 false, metadata !"", i32 0, metadata !2, metadata !3, metadata !13, metadata !21, metadata !2, metadata !"", i32 1} ; [ DW_TAG_compile_unit ] [/usr/local/google/home/echristo/tmp/baz.cpp] [DW_LANG_C_plus_plus]
>>> !1 = metadata !{metadata !"baz.cpp", metadata !"/usr/local/google/home/echristo/tmp"}
>>> !2 = metadata !{}
>>> !3 = metadata !{metadata !4}
>>>
>>> Modified: llvm/trunk/test/DebugInfo/X86/cu-ranges.ll
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/cu-ranges.ll?rev=202333&r1=202332&r2=202333&view=diff
>>> ==============================================================================
>>> --- llvm/trunk/test/DebugInfo/X86/cu-ranges.ll (original)
>>> +++ llvm/trunk/test/DebugInfo/X86/cu-ranges.ll Wed Feb 26 19:25:00 2014
>>> @@ -40,7 +40,7 @@ attributes #1 = { nounwind readnone }
>>> !llvm.module.flags = !{!9, !10}
>>> !llvm.ident = !{!11}
>>>
>>> -!0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.5 (trunk 199256) (llvm/trunk 199254)", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !3, metadata !2, metadata !2, metadata !""} ; [ DW_TAG_compile_unit ] [/usr/local/google/home/echristo/tmp/foo.c] [DW_LANG_C99]
>>> +!0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.5 (trunk 199256) (llvm/trunk 199254)", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !3, metadata !2, metadata !2, metadata !"", i32 1} ; [ DW_TAG_compile_unit ] [/usr/local/google/home/echristo/tmp/foo.c] [DW_LANG_C99]
>>> !1 = metadata !{metadata !"foo.c", metadata !"/usr/local/google/home/echristo/tmp"}
>>> !2 = metadata !{}
>>> !3 = metadata !{metadata !4}
>>>
>>> Modified: llvm/trunk/test/DebugInfo/X86/stmt-list-multiple-compile-units.ll
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/stmt-list-multiple-compile-units.ll?rev=202333&r1=202332&r2=202333&view=diff
>>> ==============================================================================
>>> --- llvm/trunk/test/DebugInfo/X86/stmt-list-multiple-compile-units.ll (original)
>>> +++ llvm/trunk/test/DebugInfo/X86/stmt-list-multiple-compile-units.ll Wed Feb 26 19:25:00 2014
>>> @@ -73,7 +73,7 @@ entry:
>>>
>>> !llvm.dbg.cu = !{!0, !10}
>>> !llvm.module.flags = !{!25}
>>> -!0 = metadata !{i32 786449, metadata !23, i32 12, metadata !"clang version 3.3", i1 false, metadata !"", i32 0, metadata !1, metadata !1, metadata !3, metadata !1, metadata !1, metadata !""} ; [ DW_TAG_compile_unit ]
>>> +!0 = metadata !{i32 786449, metadata !23, i32 12, metadata !"clang version 3.3", i1 false, metadata !"", i32 0, metadata !1, metadata !1, metadata !3, metadata !1, metadata !1, metadata !"", i32 1} ; [ DW_TAG_compile_unit ]
>>> !1 = metadata !{}
>>> !3 = metadata !{metadata !5}
>>> !5 = metadata !{i32 786478, metadata !23, metadata !6, metadata !"test", metadata !"test", metadata !"", i32 2, metadata !7, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (i32)* @test, null, null, metadata !1, i32 3} ; [ DW_TAG_subprogram ] [line 2] [def] [scope 3] [test]
>>> @@ -81,7 +81,7 @@ entry:
>>> !7 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !8, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
>>> !8 = metadata !{metadata !9, metadata !9}
>>> !9 = metadata !{i32 786468, null, null, metadata !"int", i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
>>> -!10 = metadata !{i32 786449, metadata !24, i32 12, metadata !"clang version 3.3 (trunk 172862)", i1 false, metadata !"", i32 0, metadata !1, metadata !1, metadata !11, metadata !1, metadata !1, metadata !""} ; [ DW_TAG_compile_unit ]
>>> +!10 = metadata !{i32 786449, metadata !24, i32 12, metadata !"clang version 3.3 (trunk 172862)", i1 false, metadata !"", i32 0, metadata !1, metadata !1, metadata !11, metadata !1, metadata !1, metadata !"", i32 1} ; [ DW_TAG_compile_unit ]
>>> !11 = metadata !{metadata !13}
>>> !13 = metadata !{i32 786478, metadata !24, metadata !14, metadata !"fn", metadata !"fn", metadata !"", i32 1, metadata !7, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (i32)* @fn, null, null, metadata !1, i32 1} ; [ DW_TAG_subprogram ] [line 1] [def] [fn]
>>> !14 = metadata !{i32 786473, metadata !24} ; [ DW_TAG_file_type ]
>>>
>>> Modified: llvm/trunk/test/DebugInfo/cu-ranges.ll
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/cu-ranges.ll?rev=202333&r1=202332&r2=202333&view=diff
>>> ==============================================================================
>>> --- llvm/trunk/test/DebugInfo/cu-ranges.ll (original)
>>> +++ llvm/trunk/test/DebugInfo/cu-ranges.ll Wed Feb 26 19:25:00 2014
>>> @@ -33,7 +33,7 @@ attributes #1 = { nounwind readnone }
>>> !llvm.module.flags = !{!9, !10}
>>> !llvm.ident = !{!11}
>>>
>>> -!0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.5 (trunk 197756) (llvm/trunk 197768)", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !3, metadata !2, metadata !2, metadata !""} ; [ DW_TAG_compile_unit ] [/usr/local/google/home/echristo/tmp/foo.c] [DW_LANG_C99]
>>> +!0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.5 (trunk 197756) (llvm/trunk 197768)", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !3, metadata !2, metadata !2, metadata !"", i32 1} ; [ DW_TAG_compile_unit ] [/usr/local/google/home/echristo/tmp/foo.c] [DW_LANG_C99]
>>> !1 = metadata !{metadata !"foo.c", metadata !"/usr/local/google/home/echristo/tmp"}
>>> !2 = metadata !{}
>>> !3 = metadata !{metadata !4}
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list