<div dir="ltr">Test case?</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 4, 2015 at 3:44 PM, Tamas Berghammer via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">tberghammer created this revision.<br>
tberghammer added a reviewer: echristo.<br>
tberghammer added a subscriber: cfe-commits.<br>
<br>
Add new compiler flag to enable the generation of dwarf accelerator tables<br>
<br>
The dwarf accelerator tables already generated on darwin platforms. This CL ands a new flag to clang to make it possible to enable the generation of these tables on other platforms also.<br>
<br>
Note: Currently the accelerator table generation code isn't working when split dwarf is enabled for several reasons (accelerator tables aren't copied to dwo file, they contain relocation entries for the .debug_str.dwo sections). These issues should be addressed separately.<br>
<br>
<a href="http://reviews.llvm.org/D14354" rel="noreferrer" target="_blank">http://reviews.llvm.org/D14354</a><br>
<br>
Files:<br>
  include/clang/Driver/Options.td<br>
  lib/Driver/Tools.cpp<br>
<br>
Index: lib/Driver/Tools.cpp<br>
===================================================================<br>
--- lib/Driver/Tools.cpp<br>
+++ lib/Driver/Tools.cpp<br>
@@ -3876,6 +3876,14 @@<br>
     CmdArgs.push_back("-split-dwarf=Enable");<br>
   }<br>
<br>
+  // -gdwarf-accel-tables should turn on -g and enable the genereation of the<br>
+  // dwarf acceleration tables in the backend.<br>
+  if (Args.hasArg(options::OPT_gdwarf_accel_tables)) {<br>
+    DebugInfoKind = CodeGenOptions::LimitedDebugInfo;<br>
+    CmdArgs.push_back("-backend-option");<br>
+    CmdArgs.push_back("-dwarf-accel-tables=Enable");<br>
+  }<br>
+<br>
   // After we've dealt with all combinations of things that could<br>
   // make DebugInfoKind be other than None or DebugLineTablesOnly,<br>
   // figure out if we need to "upgrade" it to standalone debug info.<br>
Index: include/clang/Driver/Options.td<br>
===================================================================<br>
--- include/clang/Driver/Options.td<br>
+++ include/clang/Driver/Options.td<br>
@@ -1161,6 +1161,7 @@<br>
 def gsplit_dwarf : Flag<["-"], "gsplit-dwarf">, Group<g_flags_Group>;<br>
 def ggnu_pubnames : Flag<["-"], "ggnu-pubnames">, Group<g_flags_Group>;<br>
 def gdwarf_aranges : Flag<["-"], "gdwarf-aranges">, Group<g_flags_Group>;<br>
+def gdwarf_accel_tables : Flag<["-"], "gdwarf-accel-tables">, Group<g_flags_Group>;<br>
 def gmodules : Flag <["-"], "gmodules">, Group<f_Group>,<br>
   HelpText<"Generate debug info with external references to clang modules"<br>
            " or precompiled headers">;<br>
<br>
<br>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>