summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.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/CodeGen/CodeGenModule.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/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 660cc8bae9a..775f500fdb1 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1606,7 +1606,8 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D) {
// Emit global variable debug information.
if (CGDebugInfo *DI = getModuleDebugInfo())
- DI->EmitGlobalVariable(GV, D);
+ if (getCodeGenOpts().DebugInfo >= CodeGenOptions::LimitedDebugInfo)
+ DI->EmitGlobalVariable(GV, D);
}
llvm::GlobalValue::LinkageTypes
OpenPOWER on IntegriCloud