From f6a119254f1d0007dd9ed4851b6d85fa970ea411 Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Sat, 23 Jan 2021 12:29:04 -0800 Subject: [PATCH] fix for analyzing non-reduced ASTs --- src/script_opt/Expr.cc | 6 ++++++ src/script_opt/GenRDs.cc | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/script_opt/Expr.cc b/src/script_opt/Expr.cc index aa49eb3295..f4fb1ec1c5 100644 --- a/src/script_opt/Expr.cc +++ b/src/script_opt/Expr.cc @@ -67,6 +67,12 @@ const AddToExpr* Expr::AsAddToExpr() const return (const AddToExpr*) this; } +const InlineExpr* Expr::AsInlineExpr() const + { + CHECK_TAG(tag, EXPR_INLINE, "ExprVal::AsInlineExpr", expr_name) + return (const InlineExpr*) this; + } + ExprPtr Expr::GetOp1() const { return nullptr; } ExprPtr Expr::GetOp2() const { return nullptr; } ExprPtr Expr::GetOp3() const { return nullptr; } diff --git a/src/script_opt/GenRDs.cc b/src/script_opt/GenRDs.cc index 865334922c..06c50523ac 100644 --- a/src/script_opt/GenRDs.cc +++ b/src/script_opt/GenRDs.cc @@ -1092,7 +1092,6 @@ TraversalCode RD_Decorate::PreExpr(const Expr* e) case EXPR_INLINE: { - ASSERT(0); auto inl = e->AsInlineExpr(); mgr.SetPreFromPre(inl->Args().get(), inl); mgr.SetPreFromPre(inl->Body().get(), inl);