Change how MachineDebugInfo is fetched.

llvm-svn: 25089
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 1d9dd5c..af2c4ba 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -619,7 +619,7 @@
     default: assert(0 && "This action is not supported yet!");
     case TargetLowering::Expand: {
       if (TLI.isOperationLegal(ISD::DEBUG_LOC, MVT::Other)) {
-        MachineDebugInfo &DebugInfo = DAG.getMachineFunction().getDebugInfo();
+        MachineDebugInfo &DebugInfo = getMachineDebugInfo();
         std::vector<SDOperand> Ops;
         Ops.push_back(Tmp1);  // chain
         Ops.push_back(Node->getOperand(1));  // line #