aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2009-01-31 02:22:37 +0000
committerDale Johannesen <dalej@apple.com>2009-01-31 02:22:37 +0000
commit66978ee97773aa76c3f15bee2fc77e5905aaf068 (patch)
tree25e3d8c15f0914911fbd432279905830e3dac47c /lib/CodeGen/SelectionDAG/SelectionDAGBuild.h
parent9411cd2570e6b29ce645f9a2bf4955d32d4fd342 (diff)
Move CurDebugLoc into SelectionDAGLowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63468 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGBuild.h')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuild.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h
index 4d450cb60d..397f7b1a24 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h
@@ -164,6 +164,9 @@ public:
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 @@ public:
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 @@ public:
///
SDValue getControlRoot();
+ DebugLoc getCurDebugLoc() const { return CurDebugLoc; }
+
void CopyValueToVirtualRegister(Value *V, unsigned Reg);
void visit(Instruction &I);
@@ -531,6 +537,8 @@ private:
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