From 3ae07b2a33f5541b36913280564420aaa46a54f8 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 21 Sep 2020 17:16:57 +0100 Subject: [PATCH] TargetPassConfig.cpp - use auto const& iterator in for-range loop to avoid copies. NFCI. --- llvm/lib/CodeGen/TargetPassConfig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp index 19db8eb..ef070ee 100644 --- a/llvm/lib/CodeGen/TargetPassConfig.cpp +++ b/llvm/lib/CodeGen/TargetPassConfig.cpp @@ -550,7 +550,7 @@ void TargetPassConfig::addPass(Pass *P, bool verifyAfter) { addMachinePostPasses(Banner, /*AllowVerify*/ verifyAfter); // Add the passes after the pass P if there is any. - for (auto IP : Impl->InsertedPasses) { + for (const auto &IP : Impl->InsertedPasses) { if (IP.TargetPassID == PassID) addPass(IP.getInsertedPass(), IP.VerifyAfter); } -- 2.7.4