Store loop-unroll information inside ForStatement.

This will be useful when trying to determine the flattened size of a
program, and it is expensive to compute on demand.

Change-Id: I232d9189511502d4783e5542a9bfe0dff8ea8c4a
Bug: skia:12396
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443883
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/src/sksl/SkSLInliner.cpp b/src/sksl/SkSLInliner.cpp
index 671f69d..49c1938 100644
--- a/src/sksl/SkSLInliner.cpp
+++ b/src/sksl/SkSLInliner.cpp
@@ -491,8 +491,10 @@
             // need to ensure initializer is evaluated first so that we've already remapped its
             // declarations by the time we evaluate test & next
             std::unique_ptr<Statement> initializer = stmt(f.initializer());
+            // We can't reuse the unroll info from the original for loop, because it uses a
+            // different induction variable. Ours is a clone.
             return ForStatement::Make(*fContext, offset, std::move(initializer), expr(f.test()),
-                                      expr(f.next()), stmt(f.statement()),
+                                      expr(f.next()), stmt(f.statement()), /*unrollInfo=*/nullptr,
                                       SymbolTable::WrapIfBuiltin(f.symbols()));
         }
         case Statement::Kind::kIf: {