]> granicus.if.org Git - clang/commitdiff
Don't emit .gnu_pubnames when tuning for LLDB.
authorAdrian Prantl <aprantl@apple.com>
Tue, 10 Sep 2019 15:53:18 +0000 (15:53 +0000)
committerAdrian Prantl <aprantl@apple.com>
Tue, 10 Sep 2019 15:53:18 +0000 (15:53 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@371530 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains/Clang.cpp
test/Driver/debug-options.c

index ce50efc54f9b1b3988fac9dc2e2959fb6cb1ba60..9b2d4d874a26be429ff5d6d86d52b71cc56a4cee 100644 (file)
@@ -3397,7 +3397,6 @@ static void RenderDebugOptions(const ToolChain &TC, const Driver &D,
       Args.getLastArg(options::OPT_ggnu_pubnames, options::OPT_gno_gnu_pubnames,
                       options::OPT_gpubnames, options::OPT_gno_pubnames);
   if (DwarfFission != DwarfFissionKind::None ||
-      DebuggerTuning == llvm::DebuggerKind::LLDB ||
       (PubnamesArg && checkDebugInfoOption(PubnamesArg, Args, D, TC)))
     if (!PubnamesArg ||
         (!PubnamesArg->getOption().matches(options::OPT_gno_gnu_pubnames) &&
index 154c7891f8785212ec6ae7fca643de0a0d4664d3..aacc40f780d64cce59d20aca9f89882480dbdaad 100644 (file)
 // RUN: %clang -### -c %s 2>&1 | FileCheck -check-prefix=NORNGBSE %s
 // RUN: %clang -### -c -fdebug-ranges-base-address -fno-debug-ranges-base-address %s 2>&1 | FileCheck -check-prefix=NORNGBSE %s
 //
-// RUN: %clang -### -c -glldb %s 2>&1 | FileCheck -check-prefix=GPUB %s
+// RUN: %clang -### -c -glldb %s 2>&1 | FileCheck -check-prefix=NOPUB %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