<div dir="ltr">Test case(s)?</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 13, 2016 at 2:42 PM, Joseph Tremoulet via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">JosephTremoulet created this revision.<br>
JosephTremoulet added a reviewer: sanjoy.<br>
JosephTremoulet added a subscriber: llvm-commits.<br>
<br>
The overloads of CallInst::Create and InvokeInst::Create that are used to<br>
adjust operand bundles purport to create a new instruction "identical in<br>
every way except [for] the operand bundles", so copy the DebugLoc along<br>
with everything else.<br>
<br>
<br>
<a href="http://reviews.llvm.org/D16157" rel="noreferrer" target="_blank">http://reviews.llvm.org/D16157</a><br>
<br>
Files:<br>
  lib/IR/Instructions.cpp<br>
  lib/Transforms/Utils/InlineFunction.cpp<br>
<br>
Index: lib/Transforms/Utils/InlineFunction.cpp<br>
===================================================================<br>
--- lib/Transforms/Utils/InlineFunction.cpp<br>
+++ lib/Transforms/Utils/InlineFunction.cpp<br>
@@ -1449,7 +1449,6 @@<br>
           NewInst = CallInst::Create(cast<CallInst>(I), OpBundles, I);<br>
         else<br>
           NewInst = InvokeInst::Create(cast<InvokeInst>(I), OpBundles, I);<br>
-        NewInst->setDebugLoc(I->getDebugLoc());<br>
         NewInst->takeName(I);<br>
         I->replaceAllUsesWith(NewInst);<br>
         I->eraseFromParent();<br>
Index: lib/IR/Instructions.cpp<br>
===================================================================<br>
--- lib/IR/Instructions.cpp<br>
+++ lib/IR/Instructions.cpp<br>
@@ -309,6 +309,7 @@<br>
   NewCI->setCallingConv(CI->getCallingConv());<br>
   NewCI->SubclassOptionalData = CI->SubclassOptionalData;<br>
   NewCI->setAttributes(CI->getAttributes());<br>
+  NewCI->setDebugLoc(CI->getDebugLoc());<br>
   return NewCI;<br>
 }<br>
<br>
@@ -596,6 +597,7 @@<br>
   NewII->setCallingConv(II->getCallingConv());<br>
   NewII->SubclassOptionalData = II->SubclassOptionalData;<br>
   NewII->setAttributes(II->getAttributes());<br>
+  NewII->setDebugLoc(II->getDebugLoc());<br>
   return NewII;<br>
 }<br>
<br>
<br>
<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>