diff options
author | Tatyana Krasnukha <tatyana@synopsys.com> | 2018-06-26 13:06:54 +0000 |
---|---|---|
committer | Tatyana Krasnukha <tatyana@synopsys.com> | 2018-06-26 13:06:54 +0000 |
commit | 02aaf91252ac807c8ea2539fc7bffac193ff8718 (patch) | |
tree | 596f018fcb20351b7a4a2ac6fb12039e87cc4ab3 /source/Plugins/Instruction | |
parent | 65a6a445a6498c6e01aee6183b2ce88fa5f3d700 (diff) | |
download | lldb-02aaf91252ac807c8ea2539fc7bffac193ff8718.tar.gz |
Change AddressClass type from 'enum' to 'enum class'.
If we have a function with signature f(addr_t, AddressClass), it is easy to muddle up the order of arguments without any warnings from compiler. 'enum class' prevents passing integer in place of AddressClass and vice versa.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@335599 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'source/Plugins/Instruction')
-rw-r--r-- | source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp | 6 | ||||
-rw-r--r-- | source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp b/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp index ab5a464c1..86744520a 100644 --- a/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp +++ b/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp @@ -13888,10 +13888,10 @@ bool EmulateInstructionARM::SetInstruction(const Opcode &insn_opcode, else { AddressClass addr_class = inst_addr.GetAddressClass(); - if ((addr_class == eAddressClassCode) || - (addr_class == eAddressClassUnknown)) + if ((addr_class == AddressClass::eCode) || + (addr_class == AddressClass::eUnknown)) m_opcode_mode = eModeARM; - else if (addr_class == eAddressClassCodeAlternateISA) + else if (addr_class == AddressClass::eCodeAlternateISA) m_opcode_mode = eModeThumb; else return false; diff --git a/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp b/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp index 3593d67b9..b65747e12 100644 --- a/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp +++ b/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp @@ -1015,7 +1015,7 @@ bool EmulateInstructionMIPS::SetInstruction(const Opcode &insn_opcode, m_use_alt_disaasm = false; if (EmulateInstruction::SetInstruction(insn_opcode, inst_addr, target)) { - if (inst_addr.GetAddressClass() == eAddressClassCodeAlternateISA) { + if (inst_addr.GetAddressClass() == AddressClass::eCodeAlternateISA) { Status error; lldb::addr_t load_addr = LLDB_INVALID_ADDRESS; @@ -1044,7 +1044,7 @@ bool EmulateInstructionMIPS::SetInstruction(const Opcode &insn_opcode, return true; } else { /* - * If the address class is not eAddressClassCodeAlternateISA then + * If the address class is not AddressClass::eCodeAlternateISA then * the function is not microMIPS. In this case instruction size is * always 4 bytes. */ |