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

Devang Patel dpatel at apple.com
Thu Dec 10 15:25:41 PST 2009


Author: dpatel
Date: Thu Dec 10 17:25:41 2009
New Revision: 91077

URL: http://llvm.org/viewvc/llvm-project?rev=91077&view=rev
Log:
If VariableDIe is not created (may be because global was optimzed away) then do not try to use the variable die.

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=91077&r1=91076&r2=91077&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Thu Dec 10 17:25:41 2009
@@ -1632,6 +1632,8 @@
     return;
 
   DIE *VariableDie = createGlobalVariableDIE(DI_GV);
+  if (!VariableDie)
+    return;
 
   // Add to map.
   ModuleCU->insertDIE(N, VariableDie);





More information about the llvm-commits mailing list