Skip to content

[DebugInfo] Add DW_AT_artificial for compiler generated static member. #116327

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

Conversation

CarlosAlbertoEnciso
Copy link
Member

Consider the case when the compiler generates a static member. Any consumer of the debug info generated for that case, would benefit if that member has the DW_AT_artificial flag.

Fix buildbot failure on: llvm-clang-aarch64-darwin

  • Add specific configuration: x86_64-linux

Consider the case when the compiler generates a static member.
Any consumer of the debug info generated for that case, would
benefit if that member has the DW_AT_artificial flag.

Fix buildbot failure on: llvm-clang-aarch64-darwin
- Add specific configuration: x86_64-linux
@llvmbot
Copy link
Member

llvmbot commented Nov 15, 2024

@llvm/pr-subscribers-debuginfo

@llvm/pr-subscribers-llvm-binary-utilities

Author: Carlos Alberto Enciso (CarlosAlbertoEnciso)

Changes

Consider the case when the compiler generates a static member. Any consumer of the debug info generated for that case, would benefit if that member has the DW_AT_artificial flag.

Fix buildbot failure on: llvm-clang-aarch64-darwin

  • Add specific configuration: x86_64-linux

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

1 Files Affected:

  • (modified) llvm/test/DebugInfo/Generic/artificial-static-member.ll (+1)
diff --git a/llvm/test/DebugInfo/Generic/artificial-static-member.ll b/llvm/test/DebugInfo/Generic/artificial-static-member.ll
index 3263c976e39158..5c247d6959bf7b 100644
--- a/llvm/test/DebugInfo/Generic/artificial-static-member.ll
+++ b/llvm/test/DebugInfo/Generic/artificial-static-member.ll
@@ -1,3 +1,4 @@
+; REQUIRES: x86_64-linux
 ; RUN: llc -O0 -filetype=obj < %s |   \
 ; RUN: llvm-dwarfdump --debug-info - | FileCheck %s
 

@CarlosAlbertoEnciso CarlosAlbertoEnciso merged commit 87bfa58 into llvm:main Nov 15, 2024
12 checks passed
Comment on lines +1 to 2
; REQUIRES: x86_64-linux
; RUN: llc -O0 -filetype=obj < %s | \
Copy link
Collaborator

@pogo59 pogo59 Nov 15, 2024

Choose a reason for hiding this comment

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

The requirement will never be satisfied; the test will never run. You need a regular expression of the form target={{x86_64-.*-linux}} here.

But, it's probably better to remove the target triple clause from the IR, and add -triple=%itanium_target_triple to the llc command. Then you won't need a REQUIRES clause at all.

Copy link
Member Author

@CarlosAlbertoEnciso CarlosAlbertoEnciso Nov 15, 2024

Choose a reason for hiding this comment

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

@pogo59 Thanks very much for your feedback.
I tried your second suggestion: -triple=%itanium_target_triple but llc raises the following error:

Unknown command line argument '-triple=%itanium_target_triple'.
llc: Did you mean '--mtriple=%itanium_target_triple'?

I looked at other test cases and it seems that it is valid only for clang:
// RUN: %clang_cc1 -triple %itanium_abi_triple ....

Created a new PR using the REQUIRES with a regular expression: #116429

@dwblaikie dwblaikie added the skip-precommit-approval PR for CI feedback, not intended for review label Nov 15, 2024
@dwblaikie
Copy link
Collaborator

If you're using a PR only for presubmit checks, not for pre-commit review, please apply the skip-precommit-approval label, to make it clear that's the intent/there wasn't a missed review.

@CarlosAlbertoEnciso
Copy link
Member Author

If you're using a PR only for presubmit checks, not for pre-commit review, please apply the skip-precommit-approval label, to make it clear that's the intent/there wasn't a missed review.

@dwblaikie Thanks very much.

CarlosAlbertoEnciso added a commit to CarlosAlbertoEnciso/llvm-project that referenced this pull request Nov 15, 2024
llvm#116327)

Consider the case when the compiler generates a static member. Any
consumer of the debug info generated for that case, would benefit if
that member has the DW_AT_artificial flag.

Fix the syntax for 'REQUIRES', to include a regular expression.
CarlosAlbertoEnciso added a commit to CarlosAlbertoEnciso/llvm-project that referenced this pull request Nov 19, 2024
Include a regular expression in the 'REQUIRES' clause, to run
the test on all matching targets (x86_64 *linux*).

The original patch restricted to test just to 'x86_64-linux'
llvm#116327
CarlosAlbertoEnciso added a commit that referenced this pull request Nov 19, 2024
Include a regular expression in the 'REQUIRES' clause, to run
the test on all matching targets (x86_64 *linux*).

The original patch restricted to test just to 'x86_64-linux'
#116327
@CarlosAlbertoEnciso CarlosAlbertoEnciso deleted the artificial-static-member-fix-failing-test branch November 19, 2024 08:26
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.

4 participants