[flang] Save and fetch analyzed Expr in Variable
Add typedExpr data member to Variable like that in Expr. When expression analysis analyzed a Variable it stores the resulting evaluate::Expr there. Add GetExpr overloads in semantics/tools.h for using in statement semantics. It gets an evaluate::Expr from an Expr, Variable, or wrapper around one of those. It returns a const pointer so that clients cannot modify the cached expression (and copies do not have to be made). Change CoarrayChecker to make use of GetExpr. It will eventually replace all references to typedExpr in statement semantics. Original-commit: flang-compiler/f18@b02a41efe12032d67cbc99abe43adfb4abb422bb Reviewed-on: https://github.com/flang-compiler/f18/pull/422 Tree-same-pre-rewrite: false
Loading
Please sign in to comment