[PATCH] D67373: Don't emit .gnu_pubnames when tuning for LLDB

Adrian Prantl via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 9 15:19:47 PDT 2019


aprantl created this revision.
aprantl added reviewers: jasonmolenda, dblaikie, friss, emaste, JDevlieghere.
Herald added a project: clang.

LLDB reads the various `.apple*` 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 @dblaikie for pointing this out (a few months back; my backlog is real).

rdar://problem/50142073


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D67373

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


Index: clang/test/Driver/debug-options.c
===================================================================
--- clang/test/Driver/debug-options.c
+++ clang/test/Driver/debug-options.c
@@ -197,7 +197,7 @@
 // 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
Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -3397,7 +3397,6 @@
       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) &&


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67373.219437.patch
Type: text/x-patch
Size: 1385 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190909/589d2423/attachment-0001.bin>


More information about the cfe-commits mailing list