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(
461
461
462
462
if (reg_num != LLDB_INVALID_REGNUM &&
463
463
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 ) {
466
465
const int32_t offset = addr - m_initial_sp;
467
466
m_curr_row->SetRegisterLocationToAtCFAPlusOffset (reg_num, offset,
468
467
/* can_replace=*/ true );
@@ -608,8 +607,8 @@ bool UnwindAssemblyInstEmulation::WriteRegister(
608
607
generic_regnum != LLDB_REGNUM_GENERIC_SP) {
609
608
switch (context.GetInfoType ()) {
610
609
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 ) {
613
612
m_curr_row->SetRegisterLocationToSame (reg_num,
614
613
false /* must_replace*/ );
615
614
m_curr_row_modified = true ;
You can’t perform that action at this time.
0 commit comments