Skip to content

Commit 69028ca

Browse files
committed
changred to tunning, added test
1 parent 1ac054c commit 69028ca

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4479,7 +4479,7 @@ renderDebugOptions(const ToolChain &TC, const Driver &D, const llvm::Triple &T,
44794479
options::OPT_gpubnames, options::OPT_gno_pubnames);
44804480
if (DwarfFission != DwarfFissionKind::None ||
44814481
(PubnamesArg && checkDebugInfoOption(PubnamesArg, Args, D, TC)))
4482-
if (EffectiveDWARFVersion < 5 &&
4482+
if (DebuggerTuning != llvm::DebuggerKind::LLDB &&
44834483
(!PubnamesArg ||
44844484
(!PubnamesArg->getOption().matches(options::OPT_gno_gnu_pubnames) &&
44854485
!PubnamesArg->getOption().matches(options::OPT_gno_pubnames))))

clang/test/Driver/split-debug.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// NOINLINE-NOT: "-fsplit-dwarf-inlining"
1212
// SPLIT-NOT: "-dumpdir"
1313
// SPLIT: "-debug-info-kind=constructor"
14+
// SPLIT-SAME: "-ggnu-pubnames"
1415
// SPLIT-SAME: "-split-dwarf-file" "split-debug.dwo" "-split-dwarf-output" "split-debug.dwo"
1516

1617
// RUN: %clang -### -c -target wasm32 -gsplit-dwarf -g %s 2>&1 | FileCheck %s --check-prefix=SPLIT
@@ -123,3 +124,8 @@
123124
// G1_NOSPLIT: "-debug-info-kind=line-tables-only"
124125
// G1_NOSPLIT-NOT: "-split-dwarf-file"
125126
// G1_NOSPLIT-NOT: "-split-dwarf-output"
127+
128+
/// Do not generate -ggnu-pubnames for -glldb
129+
// RUN: %clang -### -c -target x86_64 -gsplit-dwarf -g -glldb %s 2>&1 | FileCheck %s --check-prefixes=GLLDBSPLIT
130+
131+
// GLLDBSPLIT-NOT: "-ggnu-pubnames"

0 commit comments

Comments
 (0)