[Lldb-commits] [lldb] 4b137e7 - [lldb][NFC] Remove code dupl in favour of a named variable in UnwindAssemblyInstEmulation (#169369)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 25 02:34:45 PST 2025
Author: Felipe de Azevedo Piovezan
Date: 2025-11-25T10:34:39Z
New Revision: 4b137e7446718973e209eb97402d9d06f90b8b0d
URL: https://github.com/llvm/llvm-project/commit/4b137e7446718973e209eb97402d9d06f90b8b0d
DIFF: https://github.com/llvm/llvm-project/commit/4b137e7446718973e209eb97402d9d06f90b8b0d.diff
LOG: [lldb][NFC] Remove code dupl in favour of a named variable in UnwindAssemblyInstEmulation (#169369)
Added:
Modified:
lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
index b6b073a96bcad..b9d665902dc45 100644
--- a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
+++ b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
@@ -212,11 +212,11 @@ bool UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly(
if (m_curr_row_modified) {
// Save the modified row if we don't already have a CFI row in the
// current address
- if (saved_unwind_states.count(current_offset +
- inst->GetOpcode().GetByteSize()) == 0) {
- m_state.row.SetOffset(current_offset + inst->GetOpcode().GetByteSize());
- saved_unwind_states.emplace(
- current_offset + inst->GetOpcode().GetByteSize(), m_state);
+ const lldb::addr_t next_inst_offset =
+ current_offset + inst->GetOpcode().GetByteSize();
+ if (saved_unwind_states.count(next_inst_offset) == 0) {
+ m_state.row.SetOffset(next_inst_offset);
+ saved_unwind_states.emplace(next_inst_offset, m_state);
}
}
}
More information about the lldb-commits
mailing list