Skip to content

Commit 43a3484

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 (cherry picked from commit f987f56)
1 parent 9aa6c13 commit 43a3484

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
@@ -3400,7 +3400,6 @@ static void RenderDebugOptions(const ToolChain &TC, const Driver &D,
34003400
Args.getLastArg(options::OPT_ggnu_pubnames, options::OPT_gno_gnu_pubnames,
34013401
options::OPT_gpubnames, options::OPT_gno_pubnames);
34023402
if (DwarfFission != DwarfFissionKind::None ||
3403-
DebuggerTuning == llvm::DebuggerKind::LLDB ||
34043403
(PubnamesArg && checkDebugInfoOption(PubnamesArg, Args, D, TC)))
34053404
if (!PubnamesArg ||
34063405
(!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
@@ -193,7 +193,7 @@
193193
// RUN: %clang -### -c %s 2>&1 | FileCheck -check-prefix=NORNGBSE %s
194194
// RUN: %clang -### -c -fdebug-ranges-base-address -fno-debug-ranges-base-address %s 2>&1 | FileCheck -check-prefix=NORNGBSE %s
195195
//
196-
// RUN: %clang -### -c -glldb %s 2>&1 | FileCheck -check-prefix=GPUB %s
196+
// RUN: %clang -### -c -glldb %s 2>&1 | FileCheck -check-prefix=NOPUB %s
197197
// RUN: %clang -### -c -glldb -gno-pubnames %s 2>&1 | FileCheck -check-prefix=NOPUB %s
198198
//
199199
// RUN: %clang -### -c -gdwarf-aranges %s 2>&1 | FileCheck -check-prefix=GARANGE %s

0 commit comments

Comments
 (0)