Skip to content

Commit 81a73dc

Browse files
[lldb][nfc] Reduce scope of loop variable in UnwindAssemblyInstEmulation (llvm#167914)
1 parent b27681f commit 81a73dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ bool UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly(
134134
return unwind_plan.GetRowCount() > 0;
135135
}
136136

137-
Instruction *inst = inst_list.GetInstructionAtIndex(0).get();
138-
const lldb::addr_t base_addr = inst->GetAddress().GetFileAddress();
137+
Instruction &first_inst = *inst_list.GetInstructionAtIndex(0).get();
138+
const lldb::addr_t base_addr = first_inst.GetAddress().GetFileAddress();
139139

140140
// Map for storing the unwind state at a given offset. When we see a forward
141141
// branch we add a new entry to this map with the actual unwind plan row and
@@ -161,7 +161,7 @@ bool UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly(
161161
m_curr_row_modified = false;
162162
m_forward_branch_offset = 0;
163163

164-
inst = inst_list.GetInstructionAtIndex(idx).get();
164+
Instruction *inst = inst_list.GetInstructionAtIndex(idx).get();
165165
if (!inst)
166166
continue;
167167
DumpInstToLog(log, *inst, inst_list);

0 commit comments

Comments
 (0)