[PATCH] D112151: [llvm-dwarfdump] Add a test for --summarize-types

Owen Reynolds via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 29 08:28:57 PDT 2021


gbreynoo updated this revision to Diff 383364.
gbreynoo added a comment.

As suggested by dblaikie, now the call with `summarize-types` dumps `-debug-types` and not the other sections. To keep the useful check of the `type_signature`  value it has been changed to the `LONG` prefix check.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112151/new/

https://reviews.llvm.org/D112151

Files:
  llvm/test/DebugInfo/dwarfdump-type-units.test


Index: llvm/test/DebugInfo/dwarfdump-type-units.test
===================================================================
--- llvm/test/DebugInfo/dwarfdump-type-units.test
+++ llvm/test/DebugInfo/dwarfdump-type-units.test
@@ -1,16 +1,16 @@
-RUN: llvm-dwarfdump -v %p/Inputs/dwarfdump-type-units.elf-x86-64 | FileCheck -check-prefix=CHECK -check-prefix=LONG %s
-RUN: llvm-dwarfdump -v %p/Inputs/dwarfdump-type-units.elf-x86-64 -summarize-types | FileCheck -check-prefix=CHECK -check-prefix=SHORT %s
+RUN: llvm-dwarfdump -v %p/Inputs/dwarfdump-type-units.elf-x86-64 | FileCheck -check-prefix=INFO -check-prefix=CHECK -check-prefix=LONG %s
+RUN: llvm-dwarfdump -debug-types %p/Inputs/dwarfdump-type-units.elf-x86-64 -summarize-types | FileCheck -implicit-check-not=DW_ -check-prefix=CHECK -check-prefix=SHORT %s
 RUN: llvm-dwarfdump -v -debug-types %p/Inputs/dwarfdump-type-units.elf-x86-64 | FileCheck -check-prefix=TYPES %s
 
-CHECK: debug_info contents:
+INFO: debug_info contents:
 
-CHECK: DW_TAG_variable
-CHECK-NEXT: DW_AT_name {{.*}}"f"
-CHECK: DW_AT_type [DW_FORM_ref_sig8] ([[FOO_SIG:0x[0-9a-f]*]]
+INFO: DW_TAG_variable
+INFO-NEXT: DW_AT_name {{.*}}"f"
+INFO: DW_AT_type [DW_FORM_ref_sig8] ([[FOO_SIG:0x[0-9a-f]*]]
 
-CHECK: DW_TAG_variable
-CHECK-NEXT: DW_AT_name {{.*}}"b"
-CHECK: DW_AT_type [DW_FORM_ref_sig8] ([[BAR_SIG:0x[0-9a-f]*]]
+INFO: DW_TAG_variable
+INFO-NEXT: DW_AT_name {{.*}}"b"
+INFO: DW_AT_type [DW_FORM_ref_sig8] ([[BAR_SIG:0x[0-9a-f]*]]
 
 
 CHECK: debug_types contents:
@@ -18,7 +18,8 @@
 LONG: 0x00000000: Type Unit: {{.*}} name =
 SHORT-NOT: Type Unit
 SHORT: name =
-CHECK-SAME: 'bar', type_signature = [[BAR_SIG]]
+CHECK-SAME: 'bar', type_signature = 
+LONG: [[BAR_SIG]]
 SHORT-SAME: length =
 LONG-SAME: type_offset = 0x[[BAR_OFF:[0-9a-f]*]] (next unit at
 LONG: DW_TAG_type_unit
@@ -28,7 +29,8 @@
 
 LONG: 0x00000000: Type Unit: {{.*}} name =
 SHORT: name =
-CHECK-SAME: 'foo', type_signature = [[FOO_SIG]]
+CHECK-SAME: 'foo', type_signature =
+LONG: [[FOO_SIG]]
 LONG-SAME: type_offset = 0x[[FOO_OFF:[0-9a-f]*]] (next unit at
 LONG: DW_TAG_type_unit
 LONG-NOT: NULL


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112151.383364.patch
Type: text/x-patch
Size: 2100 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211029/f0049382/attachment.bin>


More information about the llvm-commits mailing list