[llvm-commits] [llvm] r133636 - /llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp

Devang Patel dpatel at apple.com
Wed Jun 22 12:52:37 PDT 2011


Author: dpatel
Date: Wed Jun 22 14:52:36 2011
New Revision: 133636

URL: http://llvm.org/viewvc/llvm-project?rev=133636&view=rev
Log:
Set debug loc.

Modified:
    llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=133636&r1=133635&r2=133636&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Wed Jun 22 14:52:36 2011
@@ -1400,6 +1400,8 @@
     // Patch the new value into place.
     if (Op->hasName())
       NewVal->takeName(Op);
+    if (Instruction *NewValI = dyn_cast<Instruction>(NewVal))
+      NewValI->setDebugLoc(User->getDebugLoc());
     User->replaceUsesOfWith(Op, NewVal);
     UI->setOperandValToReplace(NewVal);
 





More information about the llvm-commits mailing list