[PATCH] D14354: Add new compiler flag to enable the generation of dwarf accelerator tables
Tamas Berghammer via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 4 15:44:43 PST 2015
tberghammer created this revision.
tberghammer added a reviewer: echristo.
tberghammer added a subscriber: cfe-commits.
Add new compiler flag to enable the generation of dwarf accelerator tables
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.
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.
http://reviews.llvm.org/D14354
Files:
include/clang/Driver/Options.td
lib/Driver/Tools.cpp
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -3876,6 +3876,14 @@
CmdArgs.push_back("-split-dwarf=Enable");
}
+ // -gdwarf-accel-tables should turn on -g and enable the genereation of the
+ // dwarf acceleration tables in the backend.
+ if (Args.hasArg(options::OPT_gdwarf_accel_tables)) {
+ DebugInfoKind = CodeGenOptions::LimitedDebugInfo;
+ CmdArgs.push_back("-backend-option");
+ CmdArgs.push_back("-dwarf-accel-tables=Enable");
+ }
+
// After we've dealt with all combinations of things that could
// make DebugInfoKind be other than None or DebugLineTablesOnly,
// figure out if we need to "upgrade" it to standalone debug info.
Index: include/clang/Driver/Options.td
===================================================================
--- include/clang/Driver/Options.td
+++ include/clang/Driver/Options.td
@@ -1161,6 +1161,7 @@
def gsplit_dwarf : Flag<["-"], "gsplit-dwarf">, Group<g_flags_Group>;
def ggnu_pubnames : Flag<["-"], "ggnu-pubnames">, Group<g_flags_Group>;
def gdwarf_aranges : Flag<["-"], "gdwarf-aranges">, Group<g_flags_Group>;
+def gdwarf_accel_tables : Flag<["-"], "gdwarf-accel-tables">, Group<g_flags_Group>;
def gmodules : Flag <["-"], "gmodules">, Group<f_Group>,
HelpText<"Generate debug info with external references to clang modules"
" or precompiled headers">;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14354.39274.patch
Type: text/x-patch
Size: 1449 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151104/5ccd1a89/attachment.bin>
More information about the cfe-commits
mailing list