[clang] Revert "[CLANG][DWARF] Do not emit -ggnu-pubnames for split dwarf version 5." (PR #83214)

Alexander Yermolovich via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 27 16:41:06 PST 2024


https://github.com/ayermolo created https://github.com/llvm/llvm-project/pull/83214

Reverts llvm/llvm-project#82840

>From 58007120dfbc69ccfdf04ae1eb71b30e3582b435 Mon Sep 17 00:00:00 2001
From: Alexander Yermolovich <43973793+ayermolo at users.noreply.github.com>
Date: Tue, 27 Feb 2024 16:40:45 -0800
Subject: [PATCH] =?UTF-8?q?Revert=20"[CLANG][DWARF]=20Do=20not=20emit=20-g?=
 =?UTF-8?q?gnu-pubnames=20for=20split=20dwarf=20version=205.=20=E2=80=A6"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This reverts commit b3ae6c205e4afcf1a9f7d7204a659a27ca700237.
---
 clang/lib/Driver/ToolChains/Clang.cpp | 7 +++----
 clang/test/Driver/split-debug.c       | 5 -----
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index dbfc729bba24c76..6e1b7e8657d0dc9 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -4479,10 +4479,9 @@ renderDebugOptions(const ToolChain &TC, const Driver &D, const llvm::Triple &T,
                       options::OPT_gpubnames, options::OPT_gno_pubnames);
   if (DwarfFission != DwarfFissionKind::None ||
       (PubnamesArg && checkDebugInfoOption(PubnamesArg, Args, D, TC)))
-    if (DebuggerTuning != llvm::DebuggerKind::LLDB &&
-        (!PubnamesArg ||
-         (!PubnamesArg->getOption().matches(options::OPT_gno_gnu_pubnames) &&
-          !PubnamesArg->getOption().matches(options::OPT_gno_pubnames))))
+    if (!PubnamesArg ||
+        (!PubnamesArg->getOption().matches(options::OPT_gno_gnu_pubnames) &&
+         !PubnamesArg->getOption().matches(options::OPT_gno_pubnames)))
       CmdArgs.push_back(PubnamesArg && PubnamesArg->getOption().matches(
                                            options::OPT_gpubnames)
                             ? "-gpubnames"
diff --git a/clang/test/Driver/split-debug.c b/clang/test/Driver/split-debug.c
index a2a3dc023545034..968f33b4cc035c5 100644
--- a/clang/test/Driver/split-debug.c
+++ b/clang/test/Driver/split-debug.c
@@ -124,8 +124,3 @@
 // G1_NOSPLIT: "-debug-info-kind=line-tables-only"
 // G1_NOSPLIT-NOT: "-split-dwarf-file"
 // G1_NOSPLIT-NOT: "-split-dwarf-output"
-
-/// Do not generate -ggnu-pubnames for -glldb
-// RUN: %clang -### -c -target x86_64 -gsplit-dwarf -g -glldb %s 2>&1 | FileCheck %s --check-prefixes=GLLDBSPLIT
-
-// GLLDBSPLIT-NOT: "-ggnu-pubnames"



More information about the cfe-commits mailing list