Skip to content

Commit 3ae07b2

Browse files
committed
TargetPassConfig.cpp - use auto const& iterator in for-range loop to avoid copies. NFCI.
1 parent 3ddecfd commit 3ae07b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/CodeGen/TargetPassConfig.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ void TargetPassConfig::addPass(Pass *P, bool verifyAfter) {
550550
addMachinePostPasses(Banner, /*AllowVerify*/ verifyAfter);
551551

552552
// Add the passes after the pass P if there is any.
553-
for (auto IP : Impl->InsertedPasses) {
553+
for (const auto &IP : Impl->InsertedPasses) {
554554
if (IP.TargetPassID == PassID)
555555
addPass(IP.getInsertedPass(), IP.VerifyAfter);
556556
}

0 commit comments

Comments
 (0)