[llvm] [BOLT][DWARF] Fix Test (PR #86042)

Alexander Yermolovich via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 20 16:48:55 PDT 2024


https://github.com/ayermolo created https://github.com/llvm/llvm-project/pull/86042

Test was not actually checking bolt binary, and had extra POSTCHECK-NEXT lines.

>From 07ad0e5dec75f6976446baece35601f9a58a0b7b Mon Sep 17 00:00:00 2001
From: Alexander Yermolovich <ayermolo at meta.com>
Date: Wed, 20 Mar 2024 16:46:33 -0700
Subject: [PATCH] [BOLT][DWARF] Fix Test

Test was not actually checking bolt binary, and had extra POSTCHECK-NEXT lines.
---
 bolt/test/X86/dwarf5-label-low-pc.s | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/bolt/test/X86/dwarf5-label-low-pc.s b/bolt/test/X86/dwarf5-label-low-pc.s
index b713097163348e..890d9e024d1a0c 100644
--- a/bolt/test/X86/dwarf5-label-low-pc.s
+++ b/bolt/test/X86/dwarf5-label-low-pc.s
@@ -8,6 +8,7 @@
 
 # RUN: llvm-dwarfdump --show-form --verbose --debug-addr %t.bolt > %t.txt
 # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt >> %t.txt
+# RUN: cat %t.txt | FileCheck --check-prefix=POSTCHECK %s
 
 # This test checks that we correctly handle DW_AT_low_pc [DW_FORM_addrx] that is part of DW_TAG_label.
 
@@ -35,16 +36,14 @@
 # POSTCHECK-NEXT: DW_AT_name
 # POSTCHECK-NEXT: DW_AT_decl_file
 # POSTCHECK-NEXT: DW_AT_decl_line
-# POSTCHECK-NEXT:
 # POSTCHECK-NEXT:DW_AT_low_pc [DW_FORM_addrx]  (indexed (00000002)
-# POSTCHECK-SAME: [0x[[#ADDR]]
+# POSTCHECK-SAME: 0x[[#ADDR]]
 # POSTCHECK: DW_TAG_label
 # POSTCHECK-NEXT: DW_AT_name
 # POSTCHECK-NEXT: DW_AT_decl_file
 # POSTCHECK-NEXT: DW_AT_decl_line
-# POSTCHECK-NEXT:
 # POSTCHECK-NEXT:DW_AT_low_pc [DW_FORM_addrx]  (indexed (00000003)
-# POSTCHECK-SAME: [0x[[#ADDR2]]
+# POSTCHECK-SAME: 0x[[#ADDR2]]
 
 # clang++ main.cpp -g -S
 # int main() {



More information about the llvm-commits mailing list