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/Plugins/UnwindAssembly/InstEmulation | |
| 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/Plugins/UnwindAssembly/InstEmulation')
| -rw-r--r-- | lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp | 26 | ||||
| -rw-r--r-- | lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h | 10 |
2 files changed, 18 insertions, 18 deletions
diff --git a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp index b6b0f98ddeb..53e32586dfa 100644 --- a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp +++ b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp @@ -56,11 +56,11 @@ bool UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly( return false; if (range.GetByteSize() > 0 && range.GetBaseAddress().IsValid() && - m_inst_emulator_ap.get()) { + m_inst_emulator_up.get()) { // The instruction emulation subclass setup the unwind plan for the first // instruction. - m_inst_emulator_ap->CreateFunctionEntryUnwind(unwind_plan); + m_inst_emulator_up->CreateFunctionEntryUnwind(unwind_plan); // CreateFunctionEntryUnwind should have created the first row. If it // doesn't, then we are done. @@ -82,7 +82,7 @@ bool UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly( const uint32_t addr_byte_size = m_arch.GetAddressByteSize(); const bool show_address = true; const bool show_bytes = true; - m_inst_emulator_ap->GetRegisterInfo(unwind_plan.GetRegisterKind(), + m_inst_emulator_up->GetRegisterInfo(unwind_plan.GetRegisterKind(), unwind_plan.GetInitialCFARegister(), m_cfa_reg_info); @@ -128,14 +128,14 @@ bool UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly( // cache the pc register number (in whatever register numbering this // UnwindPlan uses) for quick reference during instruction parsing. RegisterInfo pc_reg_info; - m_inst_emulator_ap->GetRegisterInfo( + m_inst_emulator_up->GetRegisterInfo( eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC, pc_reg_info); // cache the return address register number (in whatever register // numbering this UnwindPlan uses) for quick reference during // instruction parsing. RegisterInfo ra_reg_info; - m_inst_emulator_ap->GetRegisterInfo( + m_inst_emulator_up->GetRegisterInfo( eRegisterKindGeneric, LLDB_REGNUM_GENERIC_RA, ra_reg_info); // The architecture dependent condition code of the last processed @@ -169,12 +169,12 @@ bool UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly( m_register_values = it->second.second; } - m_inst_emulator_ap->SetInstruction(inst->GetOpcode(), + m_inst_emulator_up->SetInstruction(inst->GetOpcode(), inst->GetAddress(), nullptr); if (last_condition != - m_inst_emulator_ap->GetInstructionCondition()) { - if (m_inst_emulator_ap->GetInstructionCondition() != + m_inst_emulator_up->GetInstructionCondition()) { + if (m_inst_emulator_up->GetInstructionCondition() != EmulateInstruction::UnconditionalCondition && saved_unwind_states.count(current_offset) == 0) { // If we don't have a saved row for the current offset then @@ -219,9 +219,9 @@ bool UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly( log->PutString(strm.GetString()); } - last_condition = m_inst_emulator_ap->GetInstructionCondition(); + last_condition = m_inst_emulator_up->GetInstructionCondition(); - m_inst_emulator_ap->EvaluateInstruction( + m_inst_emulator_up->EvaluateInstruction( eEmulateInstructionOptionIgnoreConditions); // If the current instruction is a branch forward then save the @@ -296,12 +296,12 @@ bool UnwindAssemblyInstEmulation::FirstNonPrologueInsn( UnwindAssembly * UnwindAssemblyInstEmulation::CreateInstance(const ArchSpec &arch) { - std::unique_ptr<EmulateInstruction> inst_emulator_ap( + std::unique_ptr<EmulateInstruction> inst_emulator_up( EmulateInstruction::FindPlugin(arch, eInstructionTypePrologueEpilogue, NULL)); // Make sure that all prologue instructions are handled - if (inst_emulator_ap) - return new UnwindAssemblyInstEmulation(arch, inst_emulator_ap.release()); + if (inst_emulator_up) + return new UnwindAssemblyInstEmulation(arch, inst_emulator_up.release()); return NULL; } diff --git a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h index 3bbccc01eb0..704865ce5d0 100644 --- a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h +++ b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h @@ -66,14 +66,14 @@ private: // Call CreateInstance to get an instance of this class UnwindAssemblyInstEmulation(const lldb_private::ArchSpec &arch, lldb_private::EmulateInstruction *inst_emulator) - : UnwindAssembly(arch), m_inst_emulator_ap(inst_emulator), + : UnwindAssembly(arch), m_inst_emulator_up(inst_emulator), m_range_ptr(NULL), m_unwind_plan_ptr(NULL), m_curr_row(), m_cfa_reg_info(), m_fp_is_cfa(false), m_register_values(), m_pushed_regs(), m_curr_row_modified(false), m_forward_branch_offset(0) { - if (m_inst_emulator_ap.get()) { - m_inst_emulator_ap->SetBaton(this); - m_inst_emulator_ap->SetCallbacks(ReadMemory, WriteMemory, ReadRegister, + if (m_inst_emulator_up.get()) { + m_inst_emulator_up->SetBaton(this); + m_inst_emulator_up->SetCallbacks(ReadMemory, WriteMemory, ReadRegister, WriteRegister); } } @@ -128,7 +128,7 @@ private: bool GetRegisterValue(const lldb_private::RegisterInfo ®_info, lldb_private::RegisterValue ®_value); - std::unique_ptr<lldb_private::EmulateInstruction> m_inst_emulator_ap; + std::unique_ptr<lldb_private::EmulateInstruction> m_inst_emulator_up; lldb_private::AddressRange *m_range_ptr; lldb_private::UnwindPlan *m_unwind_plan_ptr; lldb_private::UnwindPlan::RowSP m_curr_row; |

