Undo previous checkin.
authorDevang Patel <dpatel@apple.com>
Tue, 13 Jan 2009 22:54:57 +0000 (22:54 +0000)
committerDevang Patel <dpatel@apple.com>
Tue, 13 Jan 2009 22:54:57 +0000 (22:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62190 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/DwarfWriter.h
lib/CodeGen/AsmPrinter/DwarfWriter.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index 19601a4d9c955095a77b447624c231be2fa5c174..7c9ada8305d0245baed9131c7d1680159a1f0aa4 100644 (file)
@@ -97,9 +97,6 @@ public:
   ///
   void RecordVariable(GlobalVariable *GV, unsigned FrameIndex);
 
-  /// hasDebugInfo - Return true if debug info intrinsics are seen in 
-  /// this module.
-  bool hasDebugInfo();
 };
 
 
index 675ae983f70b19c3ce7e5022192e3d15e1d335e9..0687fd899c0563288add0d8b2437de1823360cde 100644 (file)
@@ -4990,9 +4990,3 @@ unsigned DwarfWriter::getRecordSourceLineCount() {
 void DwarfWriter::RecordVariable(GlobalVariable *GV, unsigned FrameIndex) {
   DD->RecordVariable(GV, FrameIndex);
 }
-
-/// hasDebugInfo - Return true if debug info intrinsics are seen in 
-/// this module.
-bool DwarfWriter::hasDebugInfo() {
-  return DD && DD->ShouldEmitDwarf();
-}
index 65a3e07b044137640b520c113a31d879abe9a10c..324b07025e041e552ac3aead9e1d7d9c1786c104 100644 (file)
@@ -23,7 +23,6 @@
 #include "llvm/CodeGen/MachineConstantPool.h"
 #include "llvm/CodeGen/MachineFrameInfo.h"
 #include "llvm/CodeGen/MachineModuleInfo.h"
-#include "llvm/CodeGen/DwarfWriter.h"
 #include "llvm/CodeGen/PseudoSourceValue.h"
 #include "llvm/Target/TargetRegisterInfo.h"
 #include "llvm/Target/TargetData.h"
@@ -2041,8 +2040,8 @@ bool SelectionDAG::isVerifiedDebugInfoDesc(SDValue Op) const {
   if (GA->getOffset() != 0) return false;
   GlobalVariable *GV = dyn_cast<GlobalVariable>(GA->getGlobal());
   if (!GV) return false;
-  DwarfWriter *DW = getDwarfWriter();
-  return DW && DW->hasDebugInfo();
+  MachineModuleInfo *MMI = getMachineModuleInfo();
+  return MMI && MMI->hasDebugInfo() && MMI->isVerified(GV);
 }