Skip to content

Commit f987f56

Browse files
committed
Don't emit .gnu_pubnames when tuning for LLDB.
LLDB reads the various .apple* accelerator tables (and in the near future: the DWARF 5 accelerator tables) which should make .gnu_pubnames redundant. This changes the Clang driver to no longer pass -ggnu-pubnames when tuning for LLDB. Thanks to David Blaikie for pointing this out! http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190422/thread.html#646062 rdar://problem/50142073 Differential Revision: https://reviews.llvm.org/D67373 llvm-svn: 371530
1 parent 8812157 commit f987f56

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3397,7 +3397,6 @@ static void RenderDebugOptions(const ToolChain &TC, const Driver &D,
33973397
Args.getLastArg(options::OPT_ggnu_pubnames, options::OPT_gno_gnu_pubnames,
33983398
options::OPT_gpubnames, options::OPT_gno_pubnames);
33993399
if (DwarfFission != DwarfFissionKind::None ||
3400-
DebuggerTuning == llvm::DebuggerKind::LLDB ||
34013400
(PubnamesArg && checkDebugInfoOption(PubnamesArg, Args, D, TC)))
34023401
if (!PubnamesArg ||
34033402
(!PubnamesArg->getOption().matches(options::OPT_gno_gnu_pubnames) &&

clang/test/Driver/debug-options.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
// RUN: %clang -### -c %s 2>&1 | FileCheck -check-prefix=NORNGBSE %s
198198
// RUN: %clang -### -c -fdebug-ranges-base-address -fno-debug-ranges-base-address %s 2>&1 | FileCheck -check-prefix=NORNGBSE %s
199199
//
200-
// RUN: %clang -### -c -glldb %s 2>&1 | FileCheck -check-prefix=GPUB %s
200+
// RUN: %clang -### -c -glldb %s 2>&1 | FileCheck -check-prefix=NOPUB %s
201201
// RUN: %clang -### -c -glldb -gno-pubnames %s 2>&1 | FileCheck -check-prefix=NOPUB %s
202202
//
203203
// RUN: %clang -### -c -gdwarf-aranges %s 2>&1 | FileCheck -check-prefix=GARANGE %s

0 commit comments

Comments
 (0)