[llvm] r192376 - Add comments to debug info testing case.
Eric Christopher
echristo at gmail.com
Thu Oct 10 12:13:54 PDT 2013
No. The test case is, as it should be, getting larger and more complex. It
has numerous data structures and variables, checking that you are looking
at the right structure by name makes the test more clear and accurate.
On Oct 10, 2013 11:56 AM, "Manman Ren" <manman.ren at gmail.com> wrote:
>
>
>
> On Thu, Oct 10, 2013 at 11:51 AM, Eric Christopher <echristo at gmail.com>wrote:
>
>> Comments aren't what I meant. I meant to check in the test case that the
>> particular structure you're checking is the one you expect. Particular
>> advice would be to check the name of the variable or type.
>>
> I check the type by using TYPE and TYPE2. Is that what you are asking?
>
> Manman
>
> On Oct 10, 2013 11:18 AM, "Manman Ren" <manman.ren at gmail.com> wrote:
>>
>>> Author: mren
>>> Date: Thu Oct 10 13:13:17 2013
>>> New Revision: 192376
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=192376&view=rev
>>> Log:
>>> Add comments to debug info testing case.
>>>
>>> Modified:
>>> llvm/trunk/test/DebugInfo/tu-composite.ll
>>>
>>> Modified: llvm/trunk/test/DebugInfo/tu-composite.ll
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/tu-composite.ll?rev=192376&r1=192375&r2=192376&view=diff
>>>
>>> ==============================================================================
>>> --- llvm/trunk/test/DebugInfo/tu-composite.ll (original)
>>> +++ llvm/trunk/test/DebugInfo/tu-composite.ll Thu Oct 10 13:13:17 2013
>>> @@ -3,14 +3,18 @@
>>> ; RUN: llc -filetype=obj -O0 < %s > %t
>>> ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
>>> ; CHECK: [[TYPE:.*]]: DW_TAG_structure_type
>>> +; Make sure we correctly handle containing type of a struct being a
>>> type identifier.
>>> ; CHECK-NEXT: DW_AT_containing_type [DW_FORM_ref4] (cu + {{.*}}
>>> => {[[TYPE]]})
>>> +; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}= "C")
>>> ; CHECK: [[SP:.*]]: DW_TAG_subprogram
>>> +; Make sure we correctly handle containing type of a subprogram being a
>>> type identifier.
>>> ; CHECK: DW_AT_containing_type [DW_FORM_ref4] (cu + {{.*}} =>
>>> {[[TYPE]]})
>>> ; CHECK: [[TYPE2:.*]]: DW_TAG_structure_type
>>> ; CHECK: DW_TAG_structure_type
>>> ; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "D")
>>> ; CHECK: DW_TAG_member
>>> ; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "a")
>>> +; Make sure we correctly handle context of a struct being a type
>>> identifier.
>>> ; CHECK: DW_TAG_structure_type
>>> ; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}= "Nested")
>>> ; CHECK: DW_TAG_structure_type
>>> @@ -18,17 +22,21 @@
>>> ; CHECK-NEXT: DW_AT_declaration [DW_FORM_flag] (0x01)
>>> ; CHECK: DW_TAG_structure_type
>>> ; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}= "virt<bar>")
>>> +; Make sure we correctly handle type of a template_type being a type
>>> identifier.
>>> ; CHECK: DW_TAG_template_type_parameter
>>> ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]})
>>> ; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}= "T")
>>> +; Make sure we correctly handle derived-from of a typedef being a type
>>> identifier.
>>> ; CHECK: DW_TAG_typedef
>>> ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]})
>>> ; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "baz2")
>>> +; Make sure we correctly handle derived-from of a pointer type being a
>>> type identifier.
>>> ; CHECK: DW_TAG_pointer_type
>>> ; CHECK: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE]]})
>>> ; CHECK: DW_TAG_typedef
>>> ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]})
>>> ; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "baz")
>>> +; Make sure we correctly handle derived-from of an array type being a
>>> type identifier.
>>> ; CHECK: DW_TAG_array_type
>>> ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]})
>>> ; IR generated from clang -g with the following source:
>>>
>>>
>>> _______________________________________________
>>> 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/20131010/416210bd/attachment.html>
More information about the llvm-commits
mailing list