Skip to content

Commit 4b137e7

Browse files
[lldb][NFC] Remove code dupl in favour of a named variable in UnwindAssemblyInstEmulation (#169369)
1 parent cb63e99 commit 4b137e7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,11 @@ bool UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly(
212212
if (m_curr_row_modified) {
213213
// Save the modified row if we don't already have a CFI row in the
214214
// current address
215-
if (saved_unwind_states.count(current_offset +
216-
inst->GetOpcode().GetByteSize()) == 0) {
217-
m_state.row.SetOffset(current_offset + inst->GetOpcode().GetByteSize());
218-
saved_unwind_states.emplace(
219-
current_offset + inst->GetOpcode().GetByteSize(), m_state);
215+
const lldb::addr_t next_inst_offset =
216+
current_offset + inst->GetOpcode().GetByteSize();
217+
if (saved_unwind_states.count(next_inst_offset) == 0) {
218+
m_state.row.SetOffset(next_inst_offset);
219+
saved_unwind_states.emplace(next_inst_offset, m_state);
220220
}
221221
}
222222
}

0 commit comments

Comments
 (0)