Skip to content

Commit 9c5cb8f

Browse files
Use range-based for loop for variable list iteration in Instruction::Dump
1 parent 31431c0 commit 9c5cb8f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lldb/source/Core/Disassembler.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -751,8 +751,7 @@ void Instruction::Dump(lldb_private::Stream *s, uint32_t max_opcode_byte_size,
751751

752752
std::vector<std::string> annotations;
753753

754-
for (size_t i = 0; i < var_list_sp->GetSize(); ++i) {
755-
VariableSP var_sp = var_list_sp->GetVariableAtIndex(i);
754+
for (const VariableSP &var_sp : *var_list_sp) {
756755
if (!var_sp)
757756
continue;
758757

0 commit comments

Comments
 (0)