From: Pavel Labath Date: Wed, 5 Sep 2018 14:38:44 +0000 (+0000) Subject: Enable DWARF accelerator tables by default when tuning for lldb (-glldb => -gpubnames) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2a4357b081cdbe991633316e6202cdb3d9fc7f8c;p=clang 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@341472 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/ToolChains/Clang.cpp b/lib/Driver/ToolChains/Clang.cpp index 79129a7a7c..959a9b1fbc 100644 --- a/lib/Driver/ToolChains/Clang.cpp +++ b/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/test/Driver/debug-options.c b/test/Driver/debug-options.c index 04b9383c06..9c90bcb2ef 100644 --- a/test/Driver/debug-options.c +++ b/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 \