auto [...] -> auto &&[...]

This commit is contained in:
Ivan Krysak
2025-02-12 15:52:59 +02:00
parent 5b8c03b89a
commit 705e4a5955
113 changed files with 396 additions and 390 deletions
@@ -190,7 +190,7 @@ void ControlFlowGraph::simplify(const model::Binary &Binary) {
ToMerge.emplace_back(Block.ID(), Block.nextBlock());
}
for (auto [PredecessorAddress, BlockAddress] : llvm::reverse(ToMerge)) {
for (auto &&[PredecessorAddress, BlockAddress] : llvm::reverse(ToMerge)) {
efa::BasicBlock &Predecessor = Blocks().at(PredecessorAddress);
efa::BasicBlock &Block = Blocks().at(BlockAddress);
@@ -294,7 +294,7 @@ bool ControlFlowGraph::verify(const model::Binary &Binary,
}
void ControlFlowGraph::dumpCFG(const model::Binary &Binary) const {
auto [G, _] = buildControlFlowGraph<FunctionCFG>(Blocks(), Entry(), Binary);
auto &&[G, _] = buildControlFlowGraph<FunctionCFG>(Blocks(), Entry(), Binary);
WriteGraph(&G, "function-metadata");
}