From 8fffee565ce9813531d1a8ca0db87d518ae9329d Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Tue, 2 Mar 2010 01:26:20 +0000 Subject: [PATCH] Constructors and operators for anonymous aggregates does not names. Do not force empty AT_name attribute in such cases. llvm-svn: 97533 --- lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 852c7ea6401..c206334d8b7 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1177,7 +1177,9 @@ DIE *DwarfDebug::createSubprogramDIE(const DISubprogram &SP, bool MakeDecl) { return SPDie; SPDie = new DIE(dwarf::DW_TAG_subprogram); - addString(SPDie, dwarf::DW_AT_name, dwarf::DW_FORM_string, SP.getName()); + // constructors and operators for anonymous aggregates does not names. + if (!SP.getName().empty()) + addString(SPDie, dwarf::DW_AT_name, dwarf::DW_FORM_string, SP.getName()); StringRef LinkageName = SP.getLinkageName(); if (!LinkageName.empty())