ArgumentPromotion: Propagate debug locations on calls for which arguments are promoted.
[opencl/llvm.git] / lib / Transforms / IPO / ArgumentPromotion.cpp
index 377fa153a25498f1e6a0cfd92cb9c2082f580f15..4618c26bc65371a83dfa5c834eef6c885b0034a6 100644 (file)
@@ -741,6 +741,7 @@ CallGraphNode *ArgPromotion::DoPromotion(Function *F,
       if (cast<CallInst>(Call)->isTailCall())
         cast<CallInst>(New)->setTailCall();
     }
+    New->setDebugLoc(Call->getDebugLoc());
     Args.clear();
     AttributesVec.clear();