aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-08-19 03:34:03 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-08-19 03:34:03 +0000
commit2883fd4df4bba4bb57b984bcea5fa896d435a662 (patch)
treee3b46607476320e4e1de58dbd4e38fe40e561209 /lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
parent353149ea2f8d4d3bf1ec82e90f80154c6959d56e (diff)
downloadexternal_llvm-2883fd4df4bba4bb57b984bcea5fa896d435a662.zip
external_llvm-2883fd4df4bba4bb57b984bcea5fa896d435a662.tar.gz
external_llvm-2883fd4df4bba4bb57b984bcea5fa896d435a662.tar.bz2
DebugInfo: don't emit zero-length names for parameters
We check this in many/all other cases, just missed this one it seems. Perhaps it'd be worth unifying this so we never emit zero-length DW_AT_names. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188649 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index 3d2c1b8..2c21142 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -1574,7 +1574,8 @@ DIE *CompileUnit::constructVariableDIE(DbgVariable *DV,
addDIEEntry(VariableDie, dwarf::DW_AT_abstract_origin,
dwarf::DW_FORM_ref4, AbsDIE);
else {
- addString(VariableDie, dwarf::DW_AT_name, Name);
+ if (!Name.empty())
+ addString(VariableDie, dwarf::DW_AT_name, Name);
addSourceLine(VariableDie, DV->getVariable());
addType(VariableDie, DV->getType());
}