Skip to content

Loosen DWARF form check in discriminant-member.ll #139258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 9, 2025

Conversation

tromey
Copy link
Contributor

@tromey tromey commented May 9, 2025

The new test discriminant-member.ll (see #138953) failed on AIX. 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.

The new test discriminant-member.ll (see llvm#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.
@llvmbot
Copy link
Member

llvmbot commented May 9, 2025

@llvm/pr-subscribers-debuginfo

Author: Tom Tromey (tromey)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/139258.diff

1 Files Affected:

  • (modified) llvm/test/DebugInfo/Generic/discriminant-member.ll (+2-2)
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)

@hubert-reinterpretcast
Copy link
Collaborator

@tromey, you can reproduce this (without access to an AIX machine) by adding -mtriple=powerpc64-ibm-aix to the llc invocations.

Copy link
Collaborator

@hubert-reinterpretcast hubert-reinterpretcast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; thanks!

@hubert-reinterpretcast hubert-reinterpretcast merged commit 4ae529b into llvm:main May 9, 2025
6 of 9 checks passed
@tromey tromey deleted the fix-new-variant-test branch May 9, 2025 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants