DO not push DBG_VALUE machine instructions for inlined fuction arguments in entry...
authorDevang Patel <dpatel@apple.com>
Thu, 29 Apr 2010 18:50:36 +0000 (18:50 +0000)
committerDevang Patel <dpatel@apple.com>
Thu, 29 Apr 2010 18:50:36 +0000 (18:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102653 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

index 9001894d6fa789a7c4c98ab07240bbca35d2f54c..3f81268c91aca2d1f024615219ce9f0511f308d5 100644 (file)
@@ -3691,6 +3691,13 @@ SelectionDAGBuilder::EmitFuncArgumentDbgValue(const DbgValueInst &DI,
   if (!isa<Argument>(V))
     return false;
 
+  // Ignore inlined function arguments here.
+  DIVariable DV(Variable);
+  if (DV.getContext().isSubprogram()
+      && DISubprogram(DV.getContext().getNode()).getLinkageName()
+      != cast<Argument>(V)->getParent()->getName())
+    return false;
+
   MachineFunction &MF = DAG.getMachineFunction();
   MachineBasicBlock *MBB = FuncInfo.MBBMap[DI.getParent()];
   if (MBB != &MF.front())