When converting dbg.declare to dbg.value, attach promoted store's debug metadata to dbg.value

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94634 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Victor Hernandez
2010-01-27 00:44:36 +00:00
parent 2c9ad13b14
commit b7ae53f035
2 changed files with 7 additions and 3 deletions

View File

@ -883,7 +883,10 @@ void PromoteMem2Reg::ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI,
if (!DIF)
DIF = new DIFactory(*SI->getParent()->getParent()->getParent());
DIF->InsertDbgValueIntrinsic(SI->getOperand(0), Offset, DIVar, SI);
Instruction *DbgVal = DIF->InsertDbgValueIntrinsic(SI->getOperand(0), Offset,
DIVar, SI);
if (MDNode *SIMD = SI->getMetadata("dbg"))
DbgVal->setMetadata("dbg", SIMD);
}
// QueuePhiNode - queues a phi-node to be added to a basic-block for a specific