summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commit715528be0bffc028da31ed647f9415269656fc46 (patch)
treee516ccc991f17fd2fc6745569218f5039ec357de /llvm/lib
parente691fce6e4b51fe1f8a4175ada157223fed539f6 (diff)
downloadbcm5719-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.cpp3
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());
}
OpenPOWER on IntegriCloud