[llvm] Loosen DWARF form check in discriminant-member.ll (PR #139258)
Tom Tromey via llvm-commits
llvm-commits at lists.llvm.org
Fri May 9 05:59:47 PDT 2025
https://github.com/tromey created https://github.com/llvm/llvm-project/pull/139258
The new test discriminant-member.ll (see #138953) failed on AIX. I don't have ready access to AIX but looking at the report, it seems that the string form is different in the DWARF. The log reads:
50: DW_AT_name [DW_FORM_string] ("Discr")
... but the test only looks for DW_FORM_strp. Since the precise form isn't important here, this patch changes the test to accept any string form.
>From 07b89283a9586fe3821e795cb7276ab39a608341 Mon Sep 17 00:00:00 2001
From: Tom Tromey <tromey at adacore.com>
Date: Fri, 9 May 2025 06:56:58 -0600
Subject: [PATCH] Loosen DWARF form check in discriminant-member.ll
The new test discriminant-member.ll (see #138953) failed on AIX. I
don't have ready access to AIX but looking at the report, it seems
that the string form is different in the DWARF. The log reads:
50: DW_AT_name [DW_FORM_string] ("Discr")
... but the test only looks for DW_FORM_strp. Since the precise form
isn't important here, this patch changes the test to accept any string
form.
---
llvm/test/DebugInfo/Generic/discriminant-member.ll | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/test/DebugInfo/Generic/discriminant-member.ll b/llvm/test/DebugInfo/Generic/discriminant-member.ll
index 8359aef870e14..b30ae435211a4 100644
--- a/llvm/test/DebugInfo/Generic/discriminant-member.ll
+++ b/llvm/test/DebugInfo/Generic/discriminant-member.ll
@@ -5,14 +5,14 @@
; of discriminants, and where both refer to a DIE that is not a child
; of the variant.
-; CHECK: DW_AT_name [DW_FORM_strp] ({{.*}} = "Discr")
+; CHECK: DW_AT_name [DW_FORM_str{{[a-z]+}}] ({{.*}} = "Discr")
; CHECK: DW_TAG_variant_part
; CHECK-NOT: TAG
; CHECK: DW_AT_discr [DW_FORM_ref4] (cu + {{0x[0-9a-fA-F]+}} => {[[OFFSET:0x[0-9a-fA-F]+]]})
; CHECK: DW_TAG_variant
; CHECK: DW_AT_discr_list [DW_FORM_block1] (<0x05> 00 17 01 61 6c )
; CHECK: DW_TAG_member
-; CHECK: DW_AT_name [DW_FORM_strp] ({{.*}} = "var0")
+; CHECK: DW_AT_name [DW_FORM_str{{[a-z]+}}] ({{.*}} = "var0")
; CHECK: DW_AT_type
; CHECK: DW_AT_alignment
; CHECK: DW_AT_data_member_location [DW_FORM_data1] (0x00)
More information about the llvm-commits
mailing list