Author: labath Date: Thu Sep 6 10:01:45 2018 New Revision: 341564 URL: http://llvm.org/viewvc/llvm-project?rev=341564&view=rev Log: Re-commit "Enable DWARF accelerator tables by default when tuning for lldb (-glldb => -gpubnames)""
This recommits r341472, which was reverted due to test failures on macos bots. The issue was that a macos target implies -glldb which, together with this patch added a -gpubnames switch where there previously wasn't one. The intentions of those checks was to check that -gpubnames is not emitted by default so I add an explicit -ggdb arg to those command lines to get same behavior on all platforms (the fact that -glldb *does* set -gpubnames is tested by a separate test). Differential Revision: https://reviews.llvm.org/D51576 Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp cfe/trunk/test/Driver/debug-options.c Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=341564&r1=341563&r2=341564&view=diff ============================================================================== --- cfe/trunk/lib/Driver/ToolChains/Clang.cpp (original) +++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp Thu Sep 6 10:01:45 2018 @@ -3072,7 +3072,7 @@ static void RenderDebugOptions(const Too 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) && Modified: cfe/trunk/test/Driver/debug-options.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/debug-options.c?rev=341564&r1=341563&r2=341564&view=diff ============================================================================== --- cfe/trunk/test/Driver/debug-options.c (original) +++ cfe/trunk/test/Driver/debug-options.c Thu Sep 6 10:01:45 2018 @@ -153,18 +153,21 @@ // RUN: | FileCheck -check-prefix=GIGNORE %s // // RUN: %clang -### -c -ggnu-pubnames %s 2>&1 | FileCheck -check-prefix=GPUB %s -// RUN: %clang -### -c %s 2>&1 | FileCheck -check-prefix=NOPUB %s +// RUN: %clang -### -c -ggdb %s 2>&1 | FileCheck -check-prefix=NOPUB %s // RUN: %clang -### -c -ggnu-pubnames -gno-gnu-pubnames %s 2>&1 | FileCheck -check-prefix=NOPUB %s // RUN: %clang -### -c -ggnu-pubnames -gno-pubnames %s 2>&1 | FileCheck -check-prefix=NOPUB %s // // RUN: %clang -### -c -gpubnames %s 2>&1 | FileCheck -check-prefix=PUB %s -// RUN: %clang -### -c %s 2>&1 | FileCheck -check-prefix=NOPUB %s +// RUN: %clang -### -c -ggdb %s 2>&1 | FileCheck -check-prefix=NOPUB %s // RUN: %clang -### -c -gpubnames -gno-gnu-pubnames %s 2>&1 | FileCheck -check-prefix=NOPUB %s // RUN: %clang -### -c -gpubnames -gno-pubnames %s 2>&1 | FileCheck -check-prefix=NOPUB %s // // 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 \ _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits