commit | a098bf1239ca1769c93de52324d2b73adedad7b8 | [log] [tgz] |
---|---|---|
author | Devang Patel <dpatel@apple.com> | Wed Jun 22 19:52:36 2011 +0000 |
committer | Devang Patel <dpatel@apple.com> | Wed Jun 22 19:52:36 2011 +0000 |
tree | 0dd4c202a92d68cf22e5f7a9cb3baa95da0a14dc | |
parent | 6d3a0e287bb29632907e77c6303742ee65bacf1f [diff] [blame] |
Set debug loc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133636 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index d71c6ff..1d79339 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -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);