[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.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 4 10:22:56 PDT 2017


No chance of a test case for this, I take it?

On Tue, Aug 29, 2017 at 7:06 PM Craig Topper via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> 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);
>      }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170904/6c1d2cb1/attachment.html>


More information about the llvm-commits mailing list