Use pass-by-reference for-range loop. NFCI.

llvm-svn: 342481
This commit is contained in:
Simon Pilgrim 2018-09-18 14:05:07 +00:00
parent afbc234b41
commit b244435dc2
1 changed files with 3 additions and 2 deletions

View File

@ -4551,9 +4551,10 @@ void CodeGenDAGPatterns::GenerateVariants() {
PatternsToMatch[i].getAddedComplexity(), Record::getNewUID()));
MatchedPredicates.push_back(Matches);
// Add a new match the same as this pattern.
unsigned NumPatterns = PatternsToMatch.size();
for (unsigned p = 0; p != NumPatterns; ++p)
MatchedPredicates[p].resize(NumPatterns, MatchedPredicates[p][i]);
for (auto &P : MatchedPredicates)
P.resize(NumPatterns, P[i]);
}
LLVM_DEBUG(errs() << "\n");