From 7b7f0883feebeddf961e0e38fd373923b0bad14a Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 20 Apr 2010 14:48:02 +0000 Subject: If a PHI node somehow has debug info, propogate it to the MachineInstr PHI. llvm-svn: 101901 --- llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp') diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp index 704b63356a7..8ca25bb995a 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp @@ -211,11 +211,11 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf, // Create Machine PHI nodes for LLVM PHI nodes, lowering them as // appropriate. - DebugLoc DL; for (BasicBlock::const_iterator I = BB->begin(); const PHINode *PN = dyn_cast(I); ++I) { if (PN->use_empty()) continue; + DebugLoc DL = PN->getDebugLoc(); unsigned PHIReg = ValueMap[PN]; assert(PHIReg && "PHI node does not have an assigned virtual register!"); -- cgit v1.2.3