[flang] Fix build bot problem

A recent change is eliciting a valid warning from the out-of-tree
flang build bot; fix by using a reference in a range-based for().

Differential Revision: https://reviews.llvm.org/D124682
This commit is contained in:
Peter Klausler 2022-04-29 09:28:30 -07:00
parent aa7470a1b3
commit 5a7936401c
1 changed files with 1 additions and 1 deletions

View File

@ -1004,7 +1004,7 @@ void Fortran::lower::defineCommonBlocks(
std::vector<std::tuple<fir::GlobalOp, Fortran::semantics::MutableSymbolVector,
mlir::Location>>
delayedInitializations;
for (const auto [common, size] : commonBlocks)
for (const auto &[common, size] : commonBlocks)
if (auto delayedInit = declareCommonBlock(converter, common, size))
delayedInitializations.emplace_back(std::move(*delayedInit));
for (auto &[global, cmnBlkMems, loc] : delayedInitializations)