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

Devang Patel dpatel at apple.com
Thu Nov 12 18:25:26 PST 2009


Author: dpatel
Date: Thu Nov 12 20:25:26 2009
New Revision: 87069

URL: http://llvm.org/viewvc/llvm-project?rev=87069&view=rev
Log:
Ignore nameless variables.

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=87069&r1=87068&r2=87069&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Thu Nov 12 20:25:26 2009
@@ -1511,6 +1511,9 @@
                                       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 @@
                 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);
 





More information about the llvm-commits mailing list