Skip to content

Conversation

@felipepiovezan
Copy link
Contributor

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Nov 24, 2025

@llvm/pr-subscribers-lldb

Author: Felipe de Azevedo Piovezan (felipepiovezan)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/169369.diff

1 Files Affected:

  • (modified) lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp (+4-5)
diff --git a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp index b6b073a96bcad..4da09adba787b 100644 --- a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp +++ b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp @@ -212,11 +212,10 @@ 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); + auto 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); } } } 
m_state.row.SetOffset(current_offset + inst->GetOpcode().GetByteSize());
saved_unwind_states.emplace(
current_offset + inst->GetOpcode().GetByteSize(), m_state);
auto next_inst_offset = current_offset + inst->GetOpcode().GetByteSize();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use const type instead of auto.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sad, but it is the guideline

@felipepiovezan felipepiovezan enabled auto-merge (squash) November 25, 2025 10:26
@felipepiovezan felipepiovezan merged commit 4b137e7 into llvm:main Nov 25, 2025
10 checks passed
@felipepiovezan felipepiovezan deleted the felipe/gc_lldbnfc_remove_code_dupl_in_favour_of_a_named_variable_in_unwindassemblyinstemulation_24yef branch November 25, 2025 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 participants