diff options
author | Alexey Samsonov <samsonov@google.com> | 2012-05-04 07:39:27 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2012-05-04 07:39:27 +0000 |
commit | 74a3868dbba7f8b82fd2985a009713b239d237a9 (patch) | |
tree | a7fed5d515bab70dd166e15d5488142c1be2b18f /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | bdd2e34b1fcb1e69abeb075b18335a9dcefaf015 (diff) | |
download | bcm5719-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/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index fd787394d78..dfb04b42aa5 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -1087,7 +1087,8 @@ void CodeGenFunction::EmitDeclRefExprDbgValue(const DeclRefExpr *E, llvm::Constant *Init) { assert (Init && "Invalid DeclRefExpr initializer!"); if (CGDebugInfo *Dbg = getDebugInfo()) - Dbg->EmitGlobalVariable(E->getDecl(), Init); + if (CGM.getCodeGenOpts().DebugInfo >= CodeGenOptions::LimitedDebugInfo) + Dbg->EmitGlobalVariable(E->getDecl(), Init); } CodeGenFunction::PeepholeProtection |