aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetPassConfig.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2020-09-21 17:16:57 +0100
committerSimon Pilgrim <llvm-dev@redking.me.uk>2020-09-21 17:17:11 +0100
commit3ae07b2a33f5541b36913280564420aaa46a54f8 (patch)
treeb96b6b9b2bf1f512583cfbd8f653c33e50506dd9 /llvm/lib/CodeGen/TargetPassConfig.cpp
parent3ddecfd220079cd37d2d08810c3940ffcde57953 (diff)
downloadllvm-3ae07b2a33f5541b36913280564420aaa46a54f8.zip
llvm-3ae07b2a33f5541b36913280564420aaa46a54f8.tar.gz
llvm-3ae07b2a33f5541b36913280564420aaa46a54f8.tar.bz2
TargetPassConfig.cpp - use auto const& iterator in for-range loop to avoid copies. NFCI.
Diffstat (limited to 'llvm/lib/CodeGen/TargetPassConfig.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetPassConfig.cpp2
1 files changed, 1 insertions, 1 deletions
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);
}