Skip to content

Commit a01648c

Browse files
authored
Use concat in formatter (#5577)
Because this is coming up on #5576
1 parent 77afd06 commit a01648c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

toolchain/sem_ir/formatter.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,10 @@ Formatter::Formatter(const File* sem_ir,
5151
}
5252

5353
// Create empty placeholder chunks for instructions that we output lazily.
54-
for (auto lazy_insts :
55-
{sem_ir_->constants().array_ref(),
56-
sem_ir_->inst_blocks().Get(InstBlockId::ImportRefs)}) {
57-
for (auto inst_id : lazy_insts) {
58-
tentative_inst_chunks_[inst_id.index] = AddChunkNoFlush(false);
59-
}
54+
for (auto inst_id : llvm::concat<const InstId>(
55+
sem_ir_->constants().array_ref(),
56+
sem_ir_->inst_blocks().Get(InstBlockId::ImportRefs))) {
57+
tentative_inst_chunks_[inst_id.index] = AddChunkNoFlush(false);
6058
}
6159

6260
// Create a real chunk for the start of the output.

0 commit comments

Comments
 (0)