Skip to content

Commit ffefe5f

Browse files
Use llvm::join to simplify annotation output formatting
1 parent ca8510c commit ffefe5f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lldb/source/Core/Disassembler.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -787,11 +787,7 @@ void Instruction::Dump(lldb_private::Stream *s, uint32_t max_opcode_byte_size,
787787
if (!annotations.empty()) {
788788
ss.FillLastLineToColumn(annotation_column, ' ');
789789
ss.PutCString(" ; ");
790-
for (size_t i = 0; i < annotations.size(); ++i) {
791-
if (i > 0)
792-
ss.PutCString(", ");
793-
ss.PutCString(annotations[i]);
794-
}
790+
ss.PutCString(llvm::join(annotations, ", "));
795791
}
796792

797793
frame->ChangePC(original_pc);

0 commit comments

Comments
 (0)