From: Simon Pilgrim Date: Mon, 21 Sep 2020 16:16:57 +0000 (+0100) Subject: TargetPassConfig.cpp - use auto const& iterator in for-range loop to avoid copies... X-Git-Tag: llvmorg-13-init~11426 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3ae07b2a33f5541b36913280564420aaa46a54f8;p=platform%2Fupstream%2Fllvm.git TargetPassConfig.cpp - use auto const& iterator in for-range loop to avoid copies. NFCI. --- diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp index 19db8eb480ca..ef070ee7dbae 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); }