Any debug info symbol is only valid if atleast one compile unit is seen.
authorDevang Patel <dpatel@apple.com>
Fri, 16 Jan 2009 01:49:46 +0000 (01:49 +0000)
committerDevang Patel <dpatel@apple.com>
Fri, 16 Jan 2009 01:49:46 +0000 (01:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62294 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfWriter.cpp

index 4f115b1204f0113a072db4c0168a9a44d5250a0c..5e98618b2438606b74ec793ac927d2cb34f7b7db 100644 (file)
@@ -3083,6 +3083,10 @@ public:
 
   /// 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;