File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
lldb/source/Plugins/UnwindAssembly/InstEmulation Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -461,8 +461,7 @@ size_t UnwindAssemblyInstEmulation::WriteMemory(
461461
462462 if (reg_num != LLDB_INVALID_REGNUM &&
463463 generic_regnum != LLDB_REGNUM_GENERIC_SP) {
464- if (m_pushed_regs.find (reg_num) == m_pushed_regs.end ()) {
465- m_pushed_regs[reg_num] = addr;
464+ if (m_pushed_regs.try_emplace (reg_num, addr).second ) {
466465 const int32_t offset = addr - m_initial_sp;
467466 m_curr_row->SetRegisterLocationToAtCFAPlusOffset (reg_num, offset,
468467 /* can_replace=*/ true );
@@ -608,8 +607,8 @@ bool UnwindAssemblyInstEmulation::WriteRegister(
608607 generic_regnum != LLDB_REGNUM_GENERIC_SP) {
609608 switch (context.GetInfoType ()) {
610609 case EmulateInstruction::eInfoTypeAddress:
611- if (m_pushed_regs. find (reg_num) ! = m_pushed_regs.end () &&
612- context.info .address == m_pushed_regs[reg_num] ) {
610+ if (auto it = m_pushed_regs.find (reg_num);
611+ it != m_pushed_regs. end () && context.info .address == it-> second ) {
613612 m_curr_row->SetRegisterLocationToSame (reg_num,
614613 false /* must_replace*/ );
615614 m_curr_row_modified = true ;
You can’t perform that action at this time.
0 commit comments