[flang] replace GenericExprWrapper with Expr<SomeType>

Original-commit: flang-compiler/f18@0821d00cb8
Reviewed-on: https://github.com/flang-compiler/f18/pull/354
Tree-same-pre-rewrite: false
This commit is contained in:
Eric Schweitz 2019-03-19 10:33:03 -07:00 committed by Eric
parent 00a3ccd91d
commit 73ee96f7ce
3 changed files with 4 additions and 4 deletions

View File

@ -25,9 +25,9 @@
namespace Fortran::FIR {
namespace {
Expression *ExprRef(const parser::Expr &a) { return a.typedExpr.get(); }
Expression *ExprRef(const parser::Expr &a) { return a.typedExpr.get()->v; }
Expression *ExprRef(const common::Indirection<parser::Expr> &a) {
return a.value().typedExpr.get();
return a.value().typedExpr.get()->v;
}
struct LinearOp;

View File

@ -66,7 +66,7 @@ struct Attribute {
using FunctionType = evaluate::SomeType; // TODO: what should this be?
using AttributeList = std::vector<Attribute>;
enum struct LinkageTypes { Public, Hidden, External };
using Expression = evaluate::GenericExprWrapper;
using Expression = evaluate::Expr<evaluate::SomeType>;
using Variable = const semantics::Symbol *;
using PathVariable = const parser::Variable;
using Scope = const semantics::Scope;

View File

@ -30,7 +30,7 @@ Addressable_impl *GetAddressable(Statement *stmt) {
static std::string dump(const Expression &e) {
std::stringstream stringStream;
e.v.AsFortran(stringStream);
e.AsFortran(stringStream);
return stringStream.str();
}