summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/RegisterValue.cpp
diff options
context:
space:
mode:
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