Ignore nameless variables.

llvm-svn: 87069
This commit is contained in:
Devang Patel 2009-11-13 02:25:26 +00:00
parent 7c6854995d
commit 97f99fa554
1 changed files with 3 additions and 1 deletions

View File

@ -1511,6 +1511,9 @@ DIE *DwarfDebug::ConstructVariableDIE(DbgVariable *DV,
DbgScope *Scope, CompileUnit *Unit) {
// Get the descriptor.
const DIVariable &VD = DV->getVariable();
const char *Name = VD.getName();
if (!Name)
return NULL;
// Translate tag to proper Dwarf tag. The result variable is dropped for
// now.
@ -1547,7 +1550,6 @@ DIE *DwarfDebug::ConstructVariableDIE(DbgVariable *DV,
dwarf::DW_FORM_ref4, AbsDIE);
}
else {
const char *Name = VD.getName();
AddString(VariableDie, dwarf::DW_AT_name, dwarf::DW_FORM_string, Name);
AddSourceLine(VariableDie, &VD);