aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-01-13 21:25:00 +0000
committerDevang Patel <dpatel@apple.com>2009-01-13 21:25:00 +0000
commitbb8c5959c83504fbc438e6efade30fa4b70a25b6 (patch)
tree082805ac0be1d31ba812c68dd9d7f8cf92ec9755 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent4afe15b131c7cc5b97cd7934d71ec0119d3e2c5b (diff)
Use dwarf writer to decide whether the module has debug info or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62184 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 324b07025e..65a3e07b04 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -23,6 +23,7 @@
#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"
@@ -2040,8 +2041,8 @@ bool SelectionDAG::isVerifiedDebugInfoDesc(SDValue Op) const {
if (GA->getOffset() != 0) return false;
GlobalVariable *GV = dyn_cast<GlobalVariable>(GA->getGlobal());
if (!GV) return false;
- MachineModuleInfo *MMI = getMachineModuleInfo();
- return MMI && MMI->hasDebugInfo() && MMI->isVerified(GV);
+ DwarfWriter *DW = getDwarfWriter();
+ return DW && DW->hasDebugInfo();
}