From afe25498e3dcd6c6489396be5a06f6a4eb206223 Mon Sep 17 00:00:00 2001 From: Tim Keith Date: Thu, 12 Apr 2018 12:59:42 -0700 Subject: [PATCH] [flang] Resolve array specifications of entities. Add ArraySpecVisitor to recognize the various forms of array specifications. They are tracked in arraySpec_ and attrArraySpec_. Both are needed because a declaration like `integer, dimension(4) :: x(2,2), y` has two different array-specs. The method DeclareEntity was extracted out to handle the common part for EntityDecl, ObjectDecl, and DimensionStmt. AllocatableStmt and TargetStmt are now handled through their contained ObjectDecl. The test resolve07 checks the interactions between these kinds of declarations. Rename ComponentArraySpec to ArraySpec as it doesn't just occur in components. Fix some 'begin' and 'end' methods to start with upper-case letters. Original-commit: flang-compiler/f18@113bfc4fe7781b11c3d3399254a6fcea1afeedd5 Reviewed-on: https://github.com/flang-compiler/f18/pull/56 --- flang/lib/semantics/type.h | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/flang/lib/semantics/type.h b/flang/lib/semantics/type.h index 4128fe7..b4297d6 100644 --- a/flang/lib/semantics/type.h +++ b/flang/lib/semantics/type.h @@ -353,11 +353,6 @@ public: const Attrs &attrs() const { return attrs_; } const ArraySpec &shape() const { return arraySpec_; } - const DeclTypeSpec &type() const { return type_; } - const Name &name() const { return name_; } - const Attrs &attrs() const { return attrs_; } - const ComponentArraySpec &shape() const { return arraySpec_; } - private: const DeclTypeSpec type_; const Name name_; @@ -391,11 +386,6 @@ public: const std::optional &interfaceName() const { return interfaceName_; } const std::optional &typeSpec() const { return typeSpec_; } - const ProcDecl &decl() const { return decl_; } - const Attrs &attrs() const { return attrs_; } - const std::optional &interfaceName() const { return interfaceName_; } - const std::optional &typeSpec() const { return typeSpec_; } - private: ProcComponentDef(ProcDecl decl, Attrs attrs, const std::optional &interfaceName, @@ -491,16 +481,6 @@ public: return 0; } - const std::list, ParamValue>> ¶mValues() { - return paramValues_; - } - - // Provide access to the derived-type definition if is known - const DerivedTypeDef *definition() { - // TODO - return 0; - } - private: const Name name_; std::list, ParamValue>> paramValues_; -- 2.7.4