summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-05-04 22:10:05 +0000
committerChris Lattner <sabre@nondot.org>2009-05-04 22:10:05 +0000
commit354b12259fc229c09093fc1e5b11c03a2cc687b2 (patch)
tree9b7e7a9d7ddbaed65139390042a8b4ebcc9b5ac7 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
parenta30370bc33f46e894e9aaa9a7f571c40147e5e4b (diff)
downloadbcm5719-llvm-354b12259fc229c09093fc1e5b11c03a2cc687b2.tar.gz
bcm5719-llvm-354b12259fc229c09093fc1e5b11c03a2cc687b2.zip
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. llvm-svn: 70921
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
index fc45bbda22b..a91dd8e7156 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud