Do not drop location info for inlined function args.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104884 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2010-05-27 20:25:04 +00:00
parent d984eb6073
commit d8720f4ba3
3 changed files with 63 additions and 2 deletions

View File

@ -897,6 +897,11 @@ void PromoteMem2Reg::ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI,
// Propagate any debug metadata from the store onto the dbg.value.
if (MDNode *SIMD = SI->getMetadata("dbg"))
DbgVal->setMetadata("dbg", SIMD);
// Otherwise propgate debug metadata from dbg.delcare for inlined fn args.
else if (!DISubprogram(DIVar.getContext()).
describes(DDI->getParent()->getParent()))
if (MDNode *MD = DDI->getMetadata("dbg"))
DbgVal->setMetadata("dbg", MD);
}
// QueuePhiNode - queues a phi-node to be added to a basic-block for a specific