[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-26 Thread Augusto Noronha via cfe-commits
https://github.com/augusto2112 closed https://github.com/llvm/llvm-project/pull/109490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-26 Thread Augusto Noronha via cfe-commits
https://github.com/augusto2112 updated https://github.com/llvm/llvm-project/pull/109490 >From b7271f2f4a638a5c03cb28b05bb836ca245acb41 Mon Sep 17 00:00:00 2001 From: Augusto Noronha Date: Thu, 30 Mar 2023 14:01:36 -0700 Subject: [PATCH] [clang] Add "debug_transparent" attribute The `debug_tran

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-26 Thread Augusto Noronha via cfe-commits
augusto2112 wrote: I accidentally rebased on top of the wrong branch which tagged a lot of people as reviewers, I'm going to close this PR and open a new one as to not spam a ton of people. https://github.com/llvm/llvm-project/pull/109490 ___ cfe-com

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-26 Thread Michael Buch via cfe-commits
@@ -109,6 +110,21 @@ static bool IsArtificial(VarDecl const *VD) { cast(VD->getDeclContext())->isImplicit()); } +static bool usesDebugTransparent(const Decl *D, const CodeGenModule &CGM) { + if (!D) +return false; + + if (auto *attr = D->get

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-25 Thread Augusto Noronha via cfe-commits
@@ -4160,6 +4178,8 @@ llvm::DISubprogram *CGDebugInfo::getFunctionFwdDeclOrStub(GlobalDecl GD, if (Stub) { Flags |= getCallSiteRelatedAttrs(); SPFlags |= llvm::DISubprogram::SPFlagDefinition; +if (usesDebugTransparent(FD, CGM)) augusto2112 wrote:

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-25 Thread Augusto Noronha via cfe-commits
@@ -109,6 +110,21 @@ static bool IsArtificial(VarDecl const *VD) { cast(VD->getDeclContext())->isImplicit()); } +static bool usesDebugTransparent(const Decl *D, const CodeGenModule &CGM) { + if (!D) +return false; + + if (auto *attr = D->get

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-25 Thread Augusto Noronha via cfe-commits
@@ -109,6 +110,21 @@ static bool IsArtificial(VarDecl const *VD) { cast(VD->getDeclContext())->isImplicit()); } +static bool usesDebugTransparent(const Decl *D, const CodeGenModule &CGM) { + if (!D) +return false; + + if (auto *attr = D->get

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-23 Thread Paul T Robinson via cfe-commits
pogo59 wrote: My first thought was "why not use the nodebug attribute" but looking back at the Phab review, that question was raised and answered there. But I thought it was worth mentioning here. https://github.com/llvm/llvm-project/pull/109490 ___

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-23 Thread Paul T Robinson via cfe-commits
@@ -1379,6 +1379,9 @@ void DwarfUnit::applySubprogramAttributes(const DISubprogram *SP, DIE &SPDie, if (!SP->getTargetFuncName().empty()) addString(SPDie, dwarf::DW_AT_trampoline, SP->getTargetFuncName()); + if (SP->isDebugTransparent()) pogo59 wrote:

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-23 Thread Paul T Robinson via cfe-commits
@@ -109,6 +110,21 @@ static bool IsArtificial(VarDecl const *VD) { cast(VD->getDeclContext())->isImplicit()); } +static bool usesDebugTransparent(const Decl *D, const CodeGenModule &CGM) { + if (!D) +return false; + + if (auto *attr = D->get

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-23 Thread Michael Buch via cfe-commits
@@ -4160,6 +4178,8 @@ llvm::DISubprogram *CGDebugInfo::getFunctionFwdDeclOrStub(GlobalDecl GD, if (Stub) { Flags |= getCallSiteRelatedAttrs(); SPFlags |= llvm::DISubprogram::SPFlagDefinition; +if (usesDebugTransparent(FD, CGM)) Michael137 wrote:

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-23 Thread Michael Buch via cfe-commits
@@ -109,6 +110,21 @@ static bool IsArtificial(VarDecl const *VD) { cast(VD->getDeclContext())->isImplicit()); } +static bool usesDebugTransparent(const Decl *D, const CodeGenModule &CGM) { + if (!D) +return false; + + if (auto *attr = D->get

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-23 Thread Michael Buch via cfe-commits
https://github.com/Michael137 commented: Seems reasonable to me modulo nits. We'll also need a test for the "attribute ignored because not DWARF" diagnostic https://github.com/llvm/llvm-project/pull/109490 ___ cfe-commits mailing list cfe-commits@list

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-23 Thread Michael Buch via cfe-commits
@@ -109,6 +110,21 @@ static bool IsArtificial(VarDecl const *VD) { cast(VD->getDeclContext())->isImplicit()); } +static bool usesDebugTransparent(const Decl *D, const CodeGenModule &CGM) { + if (!D) +return false; + + if (auto *attr = D->get

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-23 Thread Michael Buch via cfe-commits
@@ -109,6 +110,21 @@ static bool IsArtificial(VarDecl const *VD) { cast(VD->getDeclContext())->isImplicit()); } +static bool usesDebugTransparent(const Decl *D, const CodeGenModule &CGM) { + if (!D) +return false; + + if (auto *attr = D->get

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-23 Thread Michael Buch via cfe-commits
@@ -109,6 +110,21 @@ static bool IsArtificial(VarDecl const *VD) { cast(VD->getDeclContext())->isImplicit()); } +static bool usesDebugTransparent(const Decl *D, const CodeGenModule &CGM) { + if (!D) +return false; + + if (auto *attr = D->get

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-23 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/109490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-20 Thread Augusto Noronha via cfe-commits
augusto2112 wrote: @dwblaikie @AaronBallman this is the "debug_transparent" patch that I opened last year but didn't get around to finish implementing (https://reviews.llvm.org/D146595). The current version addresses the comments left in the phabricator review: - Changed the name from debug_tr

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Augusto Noronha (augusto2112) Changes The `debug_transparent` attribute is intended as a hint for debuggers that this function itself is not interesting, but it calls a function that might be. So, when stepping in arrives at a fu

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-20 Thread Augusto Noronha via cfe-commits
https://github.com/augusto2112 created https://github.com/llvm/llvm-project/pull/109490 The `debug_transparent` attribute is intended as a hint for debuggers that this function itself is not interesting, but it calls a function that might be. So, when stepping in arrives at a function with th