[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)
Paul T Robinson via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 23 10:15:19 PDT 2024
================
@@ -109,6 +110,21 @@ static bool IsArtificial(VarDecl const *VD) {
cast<Decl>(VD->getDeclContext())->isImplicit());
}
+static bool usesDebugTransparent(const Decl *D, const CodeGenModule &CGM) {
+ if (!D)
+ return false;
+
+ if (auto *attr = D->getAttr<DebugTransparentAttr>()) {
+ auto opts = CGM.getCodeGenOpts();
+ if (opts.DwarfVersion == 0) {
----------------
pogo59 wrote:
I can't remember: if we compile with no debug info (-g0, or omit -g) is the DwarfVersion still set or is it zero? We don't want to be emitting a diagnostic just because it's a release build.
Also: No test for the emitted diagnostic (which would have told me the conditions for when it is/is-not emitted).
https://github.com/llvm/llvm-project/pull/109490
More information about the llvm-commits
mailing list