summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2012-05-04 07:39:27 +0000
committerAlexey Samsonov <samsonov@google.com>2012-05-04 07:39:27 +0000
commit74a3868dbba7f8b82fd2985a009713b239d237a9 (patch)
treea7fed5d515bab70dd166e15d5488142c1be2b18f /clang/lib/Driver/Tools.cpp
parentbdd2e34b1fcb1e69abeb075b18335a9dcefaf015 (diff)
downloadbcm5719-llvm-74a3868dbba7f8b82fd2985a009713b239d237a9.tar.gz
bcm5719-llvm-74a3868dbba7f8b82fd2985a009713b239d237a9.zip
This patch adds a new Clang compiler flag "-gline-tables-only".
It reduces the amount of emitted debug information: 1) DIEs in .debug_info have types DW_TAG_compile_unit, DW_TAG_subprogram, DW_TAG_inlined_subroutine (for opt builds) and DW_TAG_lexical_block only. 2) .debug_str contains only function names. 3) No debug data for types/namespaces/variables is emitted. 4) The data in .debug_line is enough to produce valid stack traces with function names and line numbers. Reviewed by Eric Christopher. llvm-svn: 156160
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 7a9d1cf0eba..9448425a424 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -1816,6 +1816,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
if (!A->getOption().matches(options::OPT_g0)) {
CmdArgs.push_back("-g");
}
+ if (Args.hasArg(options::OPT_gline_tables_only))
+ CmdArgs.push_back("-gline-tables-only");
Args.AddAllArgs(CmdArgs, options::OPT_ffunction_sections);
Args.AddAllArgs(CmdArgs, options::OPT_fdata_sections);
OpenPOWER on IntegriCloud