diff options
author | Chris Lattner <sabre@nondot.org> | 2009-05-04 22:10:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-05-04 22:10:05 +0000 |
commit | af29a5235d3a1a09e9fc2989a5d504f00fa9aaf3 (patch) | |
tree | 732b86b37e97b6be6a842791f8ac04aa725f9eac /lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | |
parent | 622ed671b90d449496d582b3a03c7aad1e98324a (diff) |
Make DBG_STOPPOINT nodes, and therefore DBG_LABEL labels, get a DebugLoc, so that it
shows up in -print-machineinstrs. This doesn't appear to affect anything, but it was
weird for some DBG_LABELs to have DebugLocs but not all of them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70921 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index fc45bbda22..a91dd8e715 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp @@ -3889,15 +3889,16 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) { DbgStopPointInst &SPI = cast<DbgStopPointInst>(I); if (DIDescriptor::ValidDebugInfo(SPI.getContext(), OptLevel)) { MachineFunction &MF = DAG.getMachineFunction(); + DICompileUnit CU(cast<GlobalVariable>(SPI.getContext())); + DebugLoc Loc = DebugLoc::get(MF.getOrCreateDebugLocID(CU.getGV(), + SPI.getLine(), SPI.getColumn())); + setCurDebugLoc(Loc); + if (OptLevel == CodeGenOpt::None) - DAG.setRoot(DAG.getDbgStopPoint(getRoot(), + DAG.setRoot(DAG.getDbgStopPoint(Loc, getRoot(), SPI.getLine(), SPI.getColumn(), SPI.getContext())); - DICompileUnit CU(cast<GlobalVariable>(SPI.getContext())); - unsigned idx = MF.getOrCreateDebugLocID(CU.getGV(), - SPI.getLine(), SPI.getColumn()); - setCurDebugLoc(DebugLoc::get(idx)); } return 0; } |