Donot forget to resolve dangling debug info in a case where virtual register, used for a value, is initialized after a dbg intrinsic is seen.

llvm-svn: 112207
This commit is contained in:
Devang Patel 2010-08-26 18:36:14 +00:00
parent a9c03f4fae
commit ab596a637c
1 changed files with 3 additions and 1 deletions

View File

@ -912,7 +912,9 @@ SDValue SelectionDAGBuilder::getValue(const Value *V) {
unsigned InReg = It->second;
RegsForValue RFV(*DAG.getContext(), TLI, InReg, V->getType());
SDValue Chain = DAG.getEntryNode();
return N = RFV.getCopyFromRegs(DAG, FuncInfo, getCurDebugLoc(), Chain,NULL);
N = RFV.getCopyFromRegs(DAG, FuncInfo, getCurDebugLoc(), Chain,NULL);
resolveDanglingDebugInfo(V, N);
return N;
}
// Otherwise create a new SDValue and remember it.