summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2017-09-29 09:33:31 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2017-09-29 09:33:31 +0000
commit19fc4d941f85481b8aba33021d6df55c6db98fe7 (patch)
tree15d818aaea144d0c5267bc47c601b9b5c70b4a99 /llvm/test
parent502dcb035a2c5f70ff0f1436be26bc8ad27d86eb (diff)
downloadbcm5719-llvm-19fc4d941f85481b8aba33021d6df55c6db98fe7.tar.gz
bcm5719-llvm-19fc4d941f85481b8aba33021d6df55c6db98fe7.zip
[dwarfdump][NFC] Consistent errors and warnings with --verify
This patch introduces 3 helper functions: error(), warn() and note() to make printing during verification more consistent. When supported, the respective prefixes are printed in color using the same color scheme as clang. Differential revision: https://reviews.llvm.org/D38368 llvm-svn: 314498
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/tools/llvm-dwarfdump/X86/apple_names_verify_form.s4
-rw-r--r--llvm/test/tools/llvm-dwarfdump/X86/apple_names_verify_num_atoms.s6
-rw-r--r--llvm/test/tools/llvm-dwarfdump/X86/verify_debug_abbrev.s5
-rw-r--r--llvm/test/tools/llvm-dwarfdump/X86/verify_debug_info.s6
-rw-r--r--llvm/test/tools/llvm-dwarfdump/X86/verify_unit_header_chain.s18
5 files changed, 19 insertions, 20 deletions
diff --git a/llvm/test/tools/llvm-dwarfdump/X86/apple_names_verify_form.s b/llvm/test/tools/llvm-dwarfdump/X86/apple_names_verify_form.s
index 1e58de076e9..c3cc8719a08 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/apple_names_verify_form.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/apple_names_verify_form.s
@@ -3,9 +3,9 @@
# RUN: | FileCheck %s
# CHECK: Verifying .apple_names...
-# CHECK-NEXT: error: unsupported form; failed to read HashData.
+# CHECK-NEXT: error: Unsupported form: failed to read HashData.
-# This test is meant to verify that the -verify option
+# This test is meant to verify that the -verify option
# in llvm-dwarfdump, correctly identifies that Atom[0].form is unsupported.
# As a result, the hashdata cannot be read.
diff --git a/llvm/test/tools/llvm-dwarfdump/X86/apple_names_verify_num_atoms.s b/llvm/test/tools/llvm-dwarfdump/X86/apple_names_verify_num_atoms.s
index 6ddb0c910d4..64ac626e266 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/apple_names_verify_num_atoms.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/apple_names_verify_num_atoms.s
@@ -3,9 +3,9 @@
# RUN: | FileCheck %s
# CHECK: Verifying .apple_names...
-# CHECK-NEXT: error: no atoms; failed to read HashData.
+# CHECK-NEXT: error: No atoms: failed to read HashData.
-# This test is meant to verify that the -verify option
+# This test is meant to verify that the -verify option
# in llvm-dwarfdump, correctly identifies that there is not Atom.
# As a result, the hashdata cannot be read.
@@ -21,7 +21,7 @@ Linfo_string:
.asciz "i" ## string offset=84
.asciz "int" ## string offset=86
.asciz "j" ## string offset=90
-
+
.section __DWARF,__debug_info,regular,debug
Lsection_info:
.section __DWARF,__apple_names,regular,debug
diff --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_debug_abbrev.s b/llvm/test/tools/llvm-dwarfdump/X86/verify_debug_abbrev.s
index e8571ee704e..d34296597e2 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_debug_abbrev.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_debug_abbrev.s
@@ -3,12 +3,12 @@
# RUN: | FileCheck %s
# CHECK: Verifying .debug_abbrev...
-# CHECK-NEXT: Error: Abbreviation declaration contains multiple DW_AT_stmt_list attributes.
+# CHECK-NEXT: error: Abbreviation declaration contains multiple DW_AT_stmt_list attributes.
# CHECK-NEXT:[1] DW_TAG_compile_unit DW_CHILDREN_no
# CHECK-NEXT: DW_AT_stmt_list DW_FORM_sec_offset
# CHECK-NEXT: DW_AT_GNU_dwo_name DW_FORM_strp
# CHECK-NEXT: DW_AT_stmt_list DW_FORM_strp{{[[:space:]]}}
-# CHECK-NEXT: Error: Abbreviation declaration contains multiple DW_AT_producer attributes.
+# CHECK-NEXT: error: Abbreviation declaration contains multiple DW_AT_producer attributes.
# CHECK-NEXT:[1] DW_TAG_compile_unit DW_CHILDREN_yes
# CHECK-NEXT: DW_AT_GNU_dwo_name DW_FORM_GNU_str_index
# CHECK-NEXT: DW_AT_producer DW_FORM_GNU_str_index
@@ -41,4 +41,3 @@
.byte 0 # EOM(1)
.byte 0 # EOM(2)
.byte 0 # EOM(3)
- \ No newline at end of file
diff --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_debug_info.s b/llvm/test/tools/llvm-dwarfdump/X86/verify_debug_info.s
index c3b9668a0cd..b87db731a75 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_debug_info.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_debug_info.s
@@ -11,9 +11,9 @@
# CHECK-NEXT: DW_AT_comp_dir [DW_FORM_strp] ( .debug_str[0x0000003f] = "/Users/sgravani/Development/tests")
# CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
# CHECK-NEXT: DW_AT_high_pc [DW_FORM_data4] (0x00000016){{[[:space:]]}}
-# CHECK-NEXT: Units[2] - start offset: 0x00000068
-# CHECK-NEXT: Error: The length for this unit is too large for the .debug_info provided.
-# CHECK-NEXT: Error: The unit type encoding is not valid.
+# CHECK-NEXT: error: Units[2] - start offset: 0x00000068
+# CHECK-NEXT: note: The length for this unit is too large for the .debug_info provided.
+# CHECK-NEXT: note: The unit type encoding is not valid.
.section __TEXT,__text,regular,pure_instructions
diff --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_unit_header_chain.s b/llvm/test/tools/llvm-dwarfdump/X86/verify_unit_header_chain.s
index a3a54077bbf..baee5d86a24 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_unit_header_chain.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_unit_header_chain.s
@@ -3,14 +3,14 @@
# RUN: | FileCheck %s
# CHECK: Verifying .debug_info Unit Header Chain...
-# CHECK-NEXT: Units[1] - start offset: 0x0000000d
-# CHECK-NEXT: Error: The unit type encoding is not valid.
-# CHECK-NEXT: Error: The address size is unsupported.
-# CHECK-NEXT: Units[2] - start offset: 0x00000026
-# CHECK-NEXT: Error: The 16 bit unit header version is not valid.
-# CHECK-NEXT: Error: The offset into the .debug_abbrev section is not valid.
-# CHECK-NEXT: Units[4] - start offset: 0x00000041
-# CHECK-NEXT: Error: The length for this unit is too large for the .debug_info provided.
+# CHECK-NEXT: error: Units[1] - start offset: 0x0000000d
+# CHECK-NEXT: note: The unit type encoding is not valid.
+# CHECK-NEXT: note: The address size is unsupported.
+# CHECK-NEXT: error: Units[2] - start offset: 0x00000026
+# CHECK-NEXT: note: The 16 bit unit header version is not valid.
+# CHECK-NEXT: note: The offset into the .debug_abbrev section is not valid.
+# CHECK-NEXT: error: Units[4] - start offset: 0x00000041
+# CHECK-NEXT: note: The length for this unit is too large for the .debug_info provided.
.section __TEXT,__text,regular,pure_instructions
.file 1 "basic.c"
@@ -73,7 +73,7 @@ Ltu_begin1:
.long 0
.quad 0
.long 0
- .byte 0
+ .byte 0
.subsections_via_symbols
.section __DWARF,__debug_line,regular,debug
OpenPOWER on IntegriCloud