forked from OSchip/llvm-project
Add check for self-assignment. NFC
Differential Revision: https://reviews.llvm.org/D39578 llvm-svn: 318164
This commit is contained in:
parent
28f3d5cb3e
commit
f031e48f45
|
@ -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:
|
||||
|
|
|
@ -142,6 +142,9 @@ Type *Value::GetType() {
|
|||
}
|
||||
|
||||
size_t Value::AppendDataToHostBuffer(const Value &rhs) {
|
||||
if (this == &rhs)
|
||||
return 0;
|
||||
|
||||
size_t curr_size = m_data_buffer.GetByteSize();
|
||||
Status error;
|
||||
switch (rhs.GetValueType()) {
|
||||
|
|
Loading…
Reference in New Issue