[PATCH] D52901: [DebugInfo] Fix debug information label tests.

Miloš Stojanović via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 4 12:18:04 PDT 2018


mstojanovic created this revision.
mstojanovic added reviewers: HsiangKai, aprantl, petarj, zoran.jovanovic.
Herald added subscribers: atanasyan, JDevlieghere, eraman, arichardson, sdardis.

Removed the space in the asm check so that the expression is more general and can also capture MIPS labels which can be surrounded by braces, e.g.:

  .4byte        ($tmp1)                 # DW_AT_low_pc

Also changed optimization level to O0 because the DW_TAG_label don't appear on MIPS when -O2 is used.


https://reviews.llvm.org/D52901

Files:
  test/DebugInfo/Generic/debug-label-inline.ll
  test/DebugInfo/Generic/debug-label.ll


Index: test/DebugInfo/Generic/debug-label.ll
===================================================================
--- test/DebugInfo/Generic/debug-label.ll
+++ test/DebugInfo/Generic/debug-label.ll
@@ -22,12 +22,12 @@
 ; ASM-NEXT: DW_AT_name
 ; ASM-NEXT: 1 {{.*}} DW_AT_decl_file
 ; ASM-NEXT: 4 {{.*}} DW_AT_decl_line
-; ASM-NEXT: [[TOP_LOW_PC]] {{.*}} DW_AT_low_pc
+; ASM-NEXT: [[TOP_LOW_PC]]{{.*}} DW_AT_low_pc
 ; ASM: DW_TAG_label
 ; ASM-NEXT: DW_AT_name
 ; ASM-NEXT: 1 {{.*}} DW_AT_decl_file
 ; ASM-NEXT: 7 {{.*}} DW_AT_decl_line
-; ASM-NEXT: [[DONE_LOW_PC]] {{.*}} DW_AT_low_pc
+; ASM-NEXT: [[DONE_LOW_PC]]{{.*}} DW_AT_low_pc
 
 source_filename = "debug-label.c"
 
Index: test/DebugInfo/Generic/debug-label-inline.ll
===================================================================
--- test/DebugInfo/Generic/debug-label-inline.ll
+++ test/DebugInfo/Generic/debug-label-inline.ll
@@ -1,4 +1,4 @@
-; RUN: llc -O2 -filetype=obj -o - %s | llvm-dwarfdump -v - | FileCheck %s
+; RUN: llc -O0 -filetype=obj -o - %s | llvm-dwarfdump -v - | FileCheck %s
 ;
 ; CHECK: .debug_info contents:
 ; CHECK: [[LABEL_ORIGIN:0x[0-9a-zA-Z]+]]:{{ *}}DW_TAG_label


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52901.168345.patch
Type: text/x-patch
Size: 1149 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181004/b20c9f41/attachment.bin>


More information about the llvm-commits mailing list