More bulletproofing of llvm.dbg.declare.
authorJim Laskey <jlaskey@mac.com>
Tue, 28 Mar 2006 13:45:20 +0000 (13:45 +0000)
committerJim Laskey <jlaskey@mac.com>
Tue, 28 Mar 2006 13:45:20 +0000 (13:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27224 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index d404d15ff7b2e5da59f714e7f34003d0ad943905..3c633266bf90c733118e0682166d600e783e490a 100644 (file)
@@ -1390,7 +1390,7 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
   case Intrinsic::dbg_declare: {
     MachineDebugInfo *DebugInfo = DAG.getMachineDebugInfo();
     DbgDeclareInst &DI = cast<DbgDeclareInst>(I);
-    if (DebugInfo && DebugInfo->Verify(DI.getVariable())) {
+    if (DebugInfo && DI.getVariable() && DebugInfo->Verify(DI.getVariable())) {
       std::vector<SDOperand> Ops;
 
       SDOperand AddressOp  = getValue(DI.getAddress());