[llvm] r312088 - [TableGen] Fix a range based for loop to take the value by reference so that SimplifyTree can modify the copy in the array if its needs to.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 29 19:05:03 PDT 2017
Author: ctopper
Date: Tue Aug 29 19:05:03 2017
New Revision: 312088
URL: http://llvm.org/viewvc/llvm-project?rev=312088&view=rev
Log:
[TableGen] Fix a range based for loop to take the value by reference so that SimplifyTree can modify the copy in the array if its needs to.
Modified:
llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=312088&r1=312087&r2=312088&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Tue Aug 29 19:05:03 2017
@@ -2304,7 +2304,7 @@ InferAllTypes(const StringMap<SmallVecto
bool MadeChange = true;
while (MadeChange) {
MadeChange = false;
- for (TreePatternNode *Tree : Trees) {
+ for (TreePatternNode *&Tree : Trees) {
MadeChange |= Tree->ApplyTypeConstraints(*this, false);
MadeChange |= SimplifyTree(Tree);
}
More information about the llvm-commits
mailing list