diff options
author | Devang Patel <dpatel@apple.com> | 2011-05-23 17:35:08 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-05-23 17:35:08 +0000 |
commit | c4d9a841591df09ad6fe2ff90f929370cafe7272 (patch) | |
tree | 32682fd13907733a7cb0de8a02ca5fc6fc10f3f5 /llvm/lib/CodeGen/SelectionDAG | |
parent | 0f6b46b8267b1f792d996d1e0cef6340a2dc9008 (diff) | |
download | bcm5719-llvm-c4d9a841591df09ad6fe2ff90f929370cafe7272.tar.gz bcm5719-llvm-c4d9a841591df09ad6fe2ff90f929370cafe7272.zip |
While replacing all uses of a SDValue with another value, do not forget to transfer SDDbgValue.
llvm-svn: 131907
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index dd33205c5de..7e4c12b0520 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/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 |