[llvm-commits] [llvm] r97533 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Devang Patel dpatel at apple.com
Mon Mar 1 17:26:20 PST 2010


Author: dpatel
Date: Mon Mar  1 19:26:20 2010
New Revision: 97533

URL: http://llvm.org/viewvc/llvm-project?rev=97533&view=rev
Log:
Constructors and operators for anonymous aggregates does not names. Do not force empty AT_name attribute in such cases.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=97533&r1=97532&r2=97533&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Mar  1 19:26:20 2010
@@ -1177,7 +1177,9 @@
     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())





More information about the llvm-commits mailing list