Support dangling type references in the IR generator's inliner

Bug: oss-fuzz:25584
Change-Id: I3d6007e373f2b3b684065cad276695fb78c0bd8f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316537
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This commit is contained in:
Brian Osman 2020-09-11 13:33:46 -04:00 committed by Skia Commit-Bot
parent de3d44109a
commit 83ba930225

View File

@ -291,6 +291,8 @@ std::unique_ptr<Expression> Inliner::inlineExpression(int offset,
return std::make_unique<TernaryExpression>(offset, expr(t.fTest),
expr(t.fIfTrue), expr(t.fIfFalse));
}
case Expression::Kind::kTypeReference:
return expression.clone();
case Expression::Kind::kVariableReference: {
const VariableReference& v = expression.as<VariableReference>();
auto found = varMap->find(&v.fVariable);