diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-08-19 03:34:03 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-08-19 03:34:03 +0000 |
commit | 715528be0bffc028da31ed647f9415269656fc46 (patch) | |
tree | e516ccc991f17fd2fc6745569218f5039ec357de /llvm/lib | |
parent | e691fce6e4b51fe1f8a4175ada157223fed539f6 (diff) | |
download | bcm5719-llvm-715528be0bffc028da31ed647f9415269656fc46.tar.gz bcm5719-llvm-715528be0bffc028da31ed647f9415269656fc46.zip |
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.
llvm-svn: 188649
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 3d2c1b8868e..2c21142af7a 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/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()); } |