Move CurDebugLoc into SelectionDAGLowering.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63468 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h
index 4d450cb..397f7b1 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h
@@ -164,6 +164,9 @@
 class SelectionDAGLowering {
   MachineBasicBlock *CurMBB;
 
+  /// CurDebugLoc - current file + line number.  Changes as we build the DAG.
+  DebugLoc CurDebugLoc;
+
   DenseMap<const Value*, SDValue> NodeMap;
 
   /// PendingLoads - Loads are not emitted to the program immediately.  We bunch
@@ -356,7 +359,8 @@
 
   SelectionDAGLowering(SelectionDAG &dag, TargetLowering &tli,
                        FunctionLoweringInfo &funcinfo)
-    : TLI(tli), DAG(dag), FuncInfo(funcinfo) {
+    : CurDebugLoc(DebugLoc::getUnknownLoc()), 
+      TLI(tli), DAG(dag), FuncInfo(funcinfo) {
   }
 
   void init(GCFunctionInfo *gfi, AliasAnalysis &aa);
@@ -382,6 +386,8 @@
   ///
   SDValue getControlRoot();
 
+  DebugLoc getCurDebugLoc() const { return CurDebugLoc; }
+
   void CopyValueToVirtualRegister(Value *V, unsigned Reg);
 
   void visit(Instruction &I);
@@ -531,6 +537,8 @@
   
   const char *implVisitBinaryAtomic(CallInst& I, ISD::NodeType Op);
   const char *implVisitAluOverflow(CallInst &I, ISD::NodeType Op);
+
+  void setCurDebugLoc(DebugLoc dl) { CurDebugLoc = dl; }
 };
 
 /// AddCatchInfo - Extract the personality and type infos from an eh.selector