diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-02-13 06:25:41 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-02-13 06:25:41 +0000 |
commit | d5b440369dbb0d41e6ecd47d6ac7410201e27f17 (patch) | |
tree | 4dc2e3c44bcd3e14143715fa86584862b2290f9f /lldb/source/Core/Disassembler.cpp | |
parent | 5cf777e41387c84518a9ff2ec1222058daf54e58 (diff) | |
download | bcm5719-llvm-d5b440369dbb0d41e6ecd47d6ac7410201e27f17.tar.gz bcm5719-llvm-d5b440369dbb0d41e6ecd47d6ac7410201e27f17.zip |
Replace 'ap' with 'up' suffix in variable names. (NFC)
The `ap` suffix is a remnant of lldb's former use of auto pointers,
before they got deprecated. Although all their uses were replaced by
unique pointers, some variables still carried the suffix.
In r353795 I removed another auto_ptr remnant, namely redundant calls to
::get for unique_pointers. Jim justly noted that this is a good
opportunity to clean up the variable names as well.
I went over all the changes to ensure my find-and-replace didn't have
any undesired side-effects. I hope I didn't miss any, but if you end up
at this commit doing a git blame on a weirdly named variable, please
know that the change was unintentional.
llvm-svn: 353912
Diffstat (limited to 'lldb/source/Core/Disassembler.cpp')
-rw-r--r-- | lldb/source/Core/Disassembler.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lldb/source/Core/Disassembler.cpp b/lldb/source/Core/Disassembler.cpp index c67677dbcf6..5f037d800ef 100644 --- a/lldb/source/Core/Disassembler.cpp +++ b/lldb/source/Core/Disassembler.cpp @@ -741,11 +741,11 @@ void Instruction::Dump(lldb_private::Stream *s, uint32_t max_opcode_byte_size, } bool Instruction::DumpEmulation(const ArchSpec &arch) { - std::unique_ptr<EmulateInstruction> insn_emulator_ap( + std::unique_ptr<EmulateInstruction> insn_emulator_up( EmulateInstruction::FindPlugin(arch, eInstructionTypeAny, nullptr)); - if (insn_emulator_ap) { - insn_emulator_ap->SetInstruction(GetOpcode(), GetAddress(), nullptr); - return insn_emulator_ap->EvaluateInstruction(0); + if (insn_emulator_up) { + insn_emulator_up->SetInstruction(GetOpcode(), GetAddress(), nullptr); + return insn_emulator_up->EvaluateInstruction(0); } return false; @@ -992,11 +992,11 @@ bool Instruction::TestEmulation(Stream *out_stream, const char *file_name) { arch.SetTriple(llvm::Triple(value_sp->GetStringValue())); bool success = false; - std::unique_ptr<EmulateInstruction> insn_emulator_ap( + std::unique_ptr<EmulateInstruction> insn_emulator_up( EmulateInstruction::FindPlugin(arch, eInstructionTypeAny, nullptr)); - if (insn_emulator_ap) + if (insn_emulator_up) success = - insn_emulator_ap->TestEmulation(out_stream, arch, data_dictionary); + insn_emulator_up->TestEmulation(out_stream, arch, data_dictionary); if (success) out_stream->Printf("Emulation test succeeded."); @@ -1012,14 +1012,14 @@ bool Instruction::Emulate( EmulateInstruction::WriteMemoryCallback write_mem_callback, EmulateInstruction::ReadRegisterCallback read_reg_callback, EmulateInstruction::WriteRegisterCallback write_reg_callback) { - std::unique_ptr<EmulateInstruction> insn_emulator_ap( + std::unique_ptr<EmulateInstruction> insn_emulator_up( EmulateInstruction::FindPlugin(arch, eInstructionTypeAny, nullptr)); - if (insn_emulator_ap) { - insn_emulator_ap->SetBaton(baton); - insn_emulator_ap->SetCallbacks(read_mem_callback, write_mem_callback, + if (insn_emulator_up) { + insn_emulator_up->SetBaton(baton); + insn_emulator_up->SetCallbacks(read_mem_callback, write_mem_callback, read_reg_callback, write_reg_callback); - insn_emulator_ap->SetInstruction(GetOpcode(), GetAddress(), nullptr); - return insn_emulator_ap->EvaluateInstruction(evaluate_options); + insn_emulator_up->SetInstruction(GetOpcode(), GetAddress(), nullptr); + return insn_emulator_up->EvaluateInstruction(evaluate_options); } return false; |