aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-05-23 17:35:08 +0000
committerDevang Patel <dpatel@apple.com>2011-05-23 17:35:08 +0000
commit35b6994608b2b7c86714cc464dfb2d086b0cafca (patch)
tree64df8bd7db1fbe75f3ab60aff8d24c28c9f9bc84 /lib
parent88c62fc1b4e9134c7acf326cba2ba07295f9347b (diff)
downloadexternal_llvm-35b6994608b2b7c86714cc464dfb2d086b0cafca.zip
external_llvm-35b6994608b2b7c86714cc464dfb2d086b0cafca.tar.gz
external_llvm-35b6994608b2b7c86714cc464dfb2d086b0cafca.tar.bz2
While replacing all uses of a SDValue with another value, do not forget to transfer SDDbgValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131907 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index dd33205..7e4c12b 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -5150,6 +5150,9 @@ void SelectionDAG::ReplaceAllUsesWith(SDValue FromN, SDValue To,
"Cannot replace with this method!");
assert(From != To.getNode() && "Cannot replace uses of with self");
+ // Transfer debug values.
+ TransferDbgValues(FromN, To);
+
// Iterate over all the existing uses of From. New uses will be added
// to the beginning of the use list, which we avoid visiting.
// This specifically avoids visiting uses of From that arise while the