summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-11-06 17:58:12 +0000
committerDevang Patel <dpatel@apple.com>2009-11-06 17:58:12 +0000
commitcc11371b77431bbffeb104c8e5999c38f6a016e0 (patch)
treebedbc5a60f75eaf110c55de500e88315e718f5a6 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent4f24225e8ed8e46ce37da804ff7fb4ea1adc95bf (diff)
downloadbcm5719-llvm-cc11371b77431bbffeb104c8e5999c38f6a016e0.tar.gz
bcm5719-llvm-cc11371b77431bbffeb104c8e5999c38f6a016e0.zip
Do not bother to emit debug info for nameless global variable.
llvm-svn: 86259
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 6b54e618c3d..de8cfc6b999 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1098,8 +1098,8 @@ DIE *DwarfDebug::ConstructEnumTypeDIE(CompileUnit *DW_Unit, DIEnumerator *ETy) {
DIE *DwarfDebug::CreateGlobalVariableDIE(CompileUnit *DW_Unit,
const DIGlobalVariable &GV) {
// If the global variable was optmized out then no need to create debug info entry.
- if (!GV.getGlobal())
- return NULL;
+ if (!GV.getGlobal()) return NULL;
+ if (!GV.getDisplayName()) return NULL;
DIE *GVDie = new DIE(dwarf::DW_TAG_variable);
AddString(GVDie, dwarf::DW_AT_name, dwarf::DW_FORM_string,
OpenPOWER on IntegriCloud