[llvm-commits] [llvm] r62294 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp

Devang Patel dpatel at apple.com
Thu Jan 15 17:49:46 PST 2009


Author: dpatel
Date: Thu Jan 15 19:49:46 2009
New Revision: 62294

URL: http://llvm.org/viewvc/llvm-project?rev=62294&view=rev
Log:
Any debug info symbol is only valid if atleast one compile unit is seen.

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

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=62294&r1=62293&r2=62294&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Thu Jan 15 19:49:46 2009
@@ -3083,6 +3083,10 @@
 
   /// ValidDebugInfo - Return true if V represents valid debug info value.
   bool ValidDebugInfo(Value *V) {
+
+    if (!shouldEmit)
+      return false;
+
     GlobalVariable *GV = getGlobalVariable(V);
     if (!GV)
       return false;





More information about the llvm-commits mailing list