diff options
author | Devang Patel <dpatel@apple.com> | 2009-11-06 17:58:12 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-11-06 17:58:12 +0000 |
commit | 83e42c7163cc29cf8afd36082164ffb8a2e4b454 (patch) | |
tree | b1d049744293905389d9485b36cc83844deec266 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | de46a5b60ea8cf3db0b613172667a7038470c578 (diff) | |
download | external_llvm-83e42c7163cc29cf8afd36082164ffb8a2e4b454.zip external_llvm-83e42c7163cc29cf8afd36082164ffb8a2e4b454.tar.gz external_llvm-83e42c7163cc29cf8afd36082164ffb8a2e4b454.tar.bz2 |
Do not bother to emit debug info for nameless global variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86259 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 6b54e61..de8cfc6 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/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, |