aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-03-02 01:26:20 +0000
committerDevang Patel <dpatel@apple.com>2010-03-02 01:26:20 +0000
commit6b506cbce0ad7ad217a58cd1d6740e23c36f67ec (patch)
treedc90ad24ca513a2c9b2aa6bf4951eb8b52164bcd /lib/CodeGen/AsmPrinter
parenta9445e11c553855a6caacbbbf77a9b993ecc651e (diff)
downloadexternal_llvm-6b506cbce0ad7ad217a58cd1d6740e23c36f67ec.zip
external_llvm-6b506cbce0ad7ad217a58cd1d6740e23c36f67ec.tar.gz
external_llvm-6b506cbce0ad7ad217a58cd1d6740e23c36f67ec.tar.bz2
Constructors and operators for anonymous aggregates does not names. Do not force empty AT_name attribute in such cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97533 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 852c7ea..c206334 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())