summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/RegisterValue.cpp
diff options
context:
space:
mode:
authorDon Hinton <hintonda@gmail.com>2017-11-14 18:19:41 +0000
committerDon Hinton <hintonda@gmail.com>2017-11-14 18:19:41 +0000
commitf031e48f4542df3fd4fe0cc1282189817cb02029 (patch)
tree6fc491608e1c12807f87ad8bc293cb1143fedfd0 /lldb/source/Core/RegisterValue.cpp
parent28f3d5cb3e0cd978e35a5d0d691036f0e821a147 (diff)
downloadbcm5719-llvm-f031e48f4542df3fd4fe0cc1282189817cb02029.tar.gz
bcm5719-llvm-f031e48f4542df3fd4fe0cc1282189817cb02029.zip
Add check for self-assignment. NFC
Differential Revision: https://reviews.llvm.org/D39578 llvm-svn: 318164
Diffstat (limited to 'lldb/source/Core/RegisterValue.cpp')
-rw-r--r--lldb/source/Core/RegisterValue.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/source/Core/RegisterValue.cpp b/lldb/source/Core/RegisterValue.cpp
index 28ce67e63dc..f64c14019cc 100644
--- a/lldb/source/Core/RegisterValue.cpp
+++ b/lldb/source/Core/RegisterValue.cpp
@@ -539,6 +539,9 @@ bool RegisterValue::SignExtend(uint32_t sign_bitpos) {
}
bool RegisterValue::CopyValue(const RegisterValue &rhs) {
+ if (this == &rhs)
+ return rhs.m_type == eTypeInvalid ? false : true;
+
m_type = rhs.m_type;
switch (m_type) {
case eTypeInvalid:
OpenPOWER on IntegriCloud