<p dir="ltr">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. </p>

<div class="gmail_quote">On Oct 10, 2013 11:56 AM, "Manman Ren" <<a href="mailto:manman.ren@gmail.com">manman.ren@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 10, 2013 at 11:51 AM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">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.</p>

</blockquote><div> I check the type by using TYPE and TYPE2. Is that what you are asking?</div><div><br></div><div>Manman</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<p dir="ltr"> </p><div><div>

<div class="gmail_quote">On Oct 10, 2013 11:18 AM, "Manman Ren" <<a href="mailto:manman.ren@gmail.com" target="_blank">manman.ren@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Author: mren<br>
Date: Thu Oct 10 13:13:17 2013<br>
New Revision: 192376<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=192376&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=192376&view=rev</a><br>
Log:<br>
Add comments to debug info testing case.<br>
<br>
Modified:<br>
    llvm/trunk/test/DebugInfo/tu-composite.ll<br>
<br>
Modified: llvm/trunk/test/DebugInfo/tu-composite.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/tu-composite.ll?rev=192376&r1=192375&r2=192376&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/tu-composite.ll?rev=192376&r1=192375&r2=192376&view=diff</a><br>



==============================================================================<br>
--- llvm/trunk/test/DebugInfo/tu-composite.ll (original)<br>
+++ llvm/trunk/test/DebugInfo/tu-composite.ll Thu Oct 10 13:13:17 2013<br>
@@ -3,14 +3,18 @@<br>
 ; RUN: llc -filetype=obj -O0 < %s > %t<br>
 ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s<br>
 ; CHECK: [[TYPE:.*]]: DW_TAG_structure_type<br>
+; Make sure we correctly handle containing type of a struct being a type identifier.<br>
 ; CHECK-NEXT: DW_AT_containing_type [DW_FORM_ref4]       (cu + {{.*}} => {[[TYPE]]})<br>
+; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}= "C")<br>
 ; CHECK: [[SP:.*]]: DW_TAG_subprogram<br>
+; Make sure we correctly handle containing type of a subprogram being a type identifier.<br>
 ; CHECK: DW_AT_containing_type [DW_FORM_ref4]       (cu + {{.*}} => {[[TYPE]]})<br>
 ; CHECK: [[TYPE2:.*]]: DW_TAG_structure_type<br>
 ; CHECK: DW_TAG_structure_type<br>
 ; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "D")<br>
 ; CHECK: DW_TAG_member<br>
 ; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "a")<br>
+; Make sure we correctly handle context of a struct being a type identifier.<br>
 ; CHECK: DW_TAG_structure_type<br>
 ; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}= "Nested")<br>
 ; CHECK: DW_TAG_structure_type<br>
@@ -18,17 +22,21 @@<br>
 ; CHECK-NEXT: DW_AT_declaration [DW_FORM_flag]      (0x01)<br>
 ; CHECK: DW_TAG_structure_type<br>
 ; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}= "virt<bar>")<br>
+; Make sure we correctly handle type of a template_type being a type identifier.<br>
 ; CHECK: DW_TAG_template_type_parameter<br>
 ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]})<br>
 ; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}= "T")<br>
+; Make sure we correctly handle derived-from of a typedef being a type identifier.<br>
 ; CHECK: DW_TAG_typedef<br>
 ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]})<br>
 ; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "baz2")<br>
+; Make sure we correctly handle derived-from of a pointer type being a type identifier.<br>
 ; CHECK: DW_TAG_pointer_type<br>
 ; CHECK: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE]]})<br>
 ; CHECK: DW_TAG_typedef<br>
 ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]})<br>
 ; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "baz")<br>
+; Make sure we correctly handle derived-from of an array type being a type identifier.<br>
 ; CHECK: DW_TAG_array_type<br>
 ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]})<br>
 ; IR generated from clang -g with the following source:<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>
</div></div></blockquote></div><br></div></div>
</blockquote></div>