TargetPassConfig.cpp - use auto const& iterator in for-range loop to avoid copies. NFCI.

This commit is contained in:
Simon Pilgrim 2020-09-21 17:16:57 +01:00
parent 3ddecfd220
commit 3ae07b2a33
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}