moved SkSL DoStatement's data into IRNode
Change-Id: I936a939c105a9707d9cd7bcfdcf3e642c8f5c99a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320259
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/SkSLInliner.cpp b/src/sksl/SkSLInliner.cpp
index 5b5f004..a06bcc4 100644
--- a/src/sksl/SkSLInliner.cpp
+++ b/src/sksl/SkSLInliner.cpp
@@ -457,7 +457,7 @@
case Statement::Kind::kDo: {
const DoStatement& d = statement.as<DoStatement>();
- return std::make_unique<DoStatement>(offset, stmt(d.fStatement), expr(d.fTest));
+ return std::make_unique<DoStatement>(offset, stmt(d.statement()), expr(d.test()));
}
case Statement::Kind::kExpression: {
const ExpressionStatement& e = statement.as<ExpressionStatement>();
@@ -845,7 +845,7 @@
case Statement::Kind::kDo: {
DoStatement& doStmt = (*stmt)->as<DoStatement>();
// The loop body is a candidate for inlining.
- this->visitStatement(&doStmt.fStatement);
+ this->visitStatement(&doStmt.statement());
// The inliner isn't smart enough to inline the test-expression for a do-while
// loop at this time. There are two limitations:
// - We would need to insert the inlined-body block at the very end of the do-