summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2018-09-05 14:38:44 +0000
committerPavel Labath <pavel@labath.sk>2018-09-05 14:38:44 +0000
commit5795673ef87b57f0b7e78f69e6d4fe8870ff9633 (patch)
treeeb4f53ae30a11f6f1fd1da151b66c36848765670
parent23ee5cbd2c1f9b097672a607298daa7e6ffeaa42 (diff)
downloadbcm5719-llvm-5795673ef87b57f0b7e78f69e6d4fe8870ff9633.tar.gz
bcm5719-llvm-5795673ef87b57f0b7e78f69e6d4fe8870ff9633.zip
Enable DWARF accelerator tables by default when tuning for lldb (-glldb => -gpubnames)
Summary: DWARF v5 accelerator tables provide a considerable performance improvement for lldb and will make the default -glldb behavior same on all targets (right now we emit apple tables on apple targets, but these are not controlled by -gpubnames, only by -glldb). Reviewers: dblaikie Subscribers: probinson, clayborg, JDevlieghere, aprantl, cfe-commits Differential Revision: https://reviews.llvm.org/D51576 llvm-svn: 341472
-rw-r--r--clang/lib/Driver/ToolChains/Clang.cpp2
-rw-r--r--clang/test/Driver/debug-options.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 79129a7a7c6..959a9b1fbca 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -3072,7 +3072,7 @@ static void RenderDebugOptions(const ToolChain &TC, const Driver &D,
const auto *PubnamesArg =
Args.getLastArg(options::OPT_ggnu_pubnames, options::OPT_gno_gnu_pubnames,
options::OPT_gpubnames, options::OPT_gno_pubnames);
- if (SplitDWARFArg ||
+ if (SplitDWARFArg || DebuggerTuning == llvm::DebuggerKind::LLDB ||
(PubnamesArg && checkDebugInfoOption(PubnamesArg, Args, D, TC)))
if (!PubnamesArg ||
(!PubnamesArg->getOption().matches(options::OPT_gno_gnu_pubnames) &&
diff --git a/clang/test/Driver/debug-options.c b/clang/test/Driver/debug-options.c
index 04b9383c063..9c90bcb2ef9 100644
--- a/clang/test/Driver/debug-options.c
+++ b/clang/test/Driver/debug-options.c
@@ -165,6 +165,9 @@
// RUN: %clang -### -c -gsplit-dwarf %s 2>&1 | FileCheck -check-prefix=GPUB %s
// RUN: %clang -### -c -gsplit-dwarf -gno-pubnames %s 2>&1 | FileCheck -check-prefix=NOPUB %s
//
+// RUN: %clang -### -c -glldb %s 2>&1 | FileCheck -check-prefix=GPUB %s
+// RUN: %clang -### -c -glldb -gno-pubnames %s 2>&1 | FileCheck -check-prefix=NOPUB %s
+//
// RUN: %clang -### -c -gdwarf-aranges %s 2>&1 | FileCheck -check-prefix=GARANGE %s
//
// RUN: %clang -### -fdebug-types-section -target x86_64-unknown-linux %s 2>&1 \
OpenPOWER on IntegriCloud