MSVC 2017 doesn't support the case where a trailing variadic template list comes after template types with default parameters. Until we upgrade to VS 2019, we can't use the simplified definitions.
/// A case selector of `CASE (n:m)` corresponds to any value from `n` to `m` and
/// is encoded as `#fir.interval, %n, %m`.
class ClosedIntervalAttr
- : public mlir::Attribute::AttrBase<ClosedIntervalAttr> {
+ : public mlir::Attribute::AttrBase<ClosedIntervalAttr, mlir::Attribute,
+ mlir::AttributeStorage> {
public:
using Base::Base;
/// an ssa-value.
/// A case selector of `CASE (:m)` corresponds to any value up to and including
/// `m` and is encoded as `#fir.upper, %m`.
-class UpperBoundAttr : public mlir::Attribute::AttrBase<UpperBoundAttr> {
+class UpperBoundAttr
+ : public mlir::Attribute::AttrBase<UpperBoundAttr, mlir::Attribute,
+ mlir::AttributeStorage> {
public:
using Base::Base;
/// an ssa-value.
/// A case selector of `CASE (n:)` corresponds to any value down to and
/// including `n` and is encoded as `#fir.lower, %n`.
-class LowerBoundAttr : public mlir::Attribute::AttrBase<LowerBoundAttr> {
+class LowerBoundAttr
+ : public mlir::Attribute::AttrBase<LowerBoundAttr, mlir::Attribute,
+ mlir::AttributeStorage> {
public:
using Base::Base;
/// interval contains exactly one value.
/// A case selector of `CASE (p)` corresponds to exactly the value `p` and is
/// encoded as `#fir.point, %p`.
-class PointIntervalAttr : public mlir::Attribute::AttrBase<PointIntervalAttr> {
+class PointIntervalAttr
+ : public mlir::Attribute::AttrBase<PointIntervalAttr, mlir::Attribute,
+ mlir::AttributeStorage> {
public:
using Base::Base;
```c++
/// This class defines a simple parameterless type. All derived types must
/// inherit from the CRTP class 'Type::TypeBase'. It takes as template
-/// parameters the concrete type (SimpleType), and the base class to use (Type).
+/// parameters the concrete type (SimpleType), the base class to use (Type),
+/// using the default storage class (TypeStorage) as the storage type.
/// 'Type::TypeBase' also provides several utility methods to simplify type
/// construction.
-class SimpleType : public Type::TypeBase<SimpleType, Type> {
+class SimpleType : public Type::TypeBase<SimpleType, Type, TypeStorage> {
public:
/// Inherit some necessary constructors from 'TypeBase'.
using Base::Base;
/// %0 = linalg.range %arg0:%arg1:%arg2 : !linalg.range
/// }
/// ```
-class RangeType : public Type::TypeBase<RangeType, Type> {
+class RangeType : public Type::TypeBase<RangeType, Type, TypeStorage> {
public:
// Used for generic hooks in TypeBase.
using Base::Base;
} // namespace ShapeTypes
/// The component type corresponding to shape, element type and attribute.
-class ComponentType : public Type::TypeBase<ComponentType, Type> {
+class ComponentType : public Type::TypeBase<ComponentType, Type, TypeStorage> {
public:
using Base::Base;
};
/// The element type of the shaped type.
-class ElementType : public Type::TypeBase<ElementType, Type> {
+class ElementType : public Type::TypeBase<ElementType, Type, TypeStorage> {
public:
using Base::Base;
};
/// The shape descriptor type represents rank and dimension sizes.
-class ShapeType : public Type::TypeBase<ShapeType, Type> {
+class ShapeType : public Type::TypeBase<ShapeType, Type, TypeStorage> {
public:
using Base::Base;
};
/// The type of a single dimension.
-class SizeType : public Type::TypeBase<SizeType, Type> {
+class SizeType : public Type::TypeBase<SizeType, Type, TypeStorage> {
public:
using Base::Base;
};
/// The ValueShape represents a (potentially unknown) runtime value and shape.
-class ValueShapeType : public Type::TypeBase<ValueShapeType, Type> {
+class ValueShapeType
+ : public Type::TypeBase<ValueShapeType, Type, TypeStorage> {
public:
using Base::Base;
/// The Witness represents a runtime constraint, to be used as shape related
/// preconditions on code execution.
-class WitnessType : public Type::TypeBase<WitnessType, Type> {
+class WitnessType : public Type::TypeBase<WitnessType, Type, TypeStorage> {
public:
using Base::Base;
};
/// Utility class for implementing attributes.
- template <typename ConcreteType, typename BaseType = Attribute,
- typename StorageType = AttributeStorage,
+ template <typename ConcreteType, typename BaseType, typename StorageType,
template <typename T> class... Traits>
using AttrBase = detail::StorageUserBase<ConcreteType, BaseType, StorageType,
detail::AttributeUniquer, Traits...>;
/// Unit attributes are attributes that hold no specific value and are given
/// meaning by their existence.
-class UnitAttr : public Attribute::AttrBase<UnitAttr> {
+class UnitAttr
+ : public Attribute::AttrBase<UnitAttr, Attribute, AttributeStorage> {
public:
using Base::Base;
/// Represents an unknown location. This is always a singleton for a given
/// MLIRContext.
-class UnknownLoc : public Attribute::AttrBase<UnknownLoc, LocationAttr> {
+class UnknownLoc
+ : public Attribute::AttrBase<UnknownLoc, LocationAttr, AttributeStorage> {
public:
using Base::Base;
/// Index is a special integer-like type with unknown platform-dependent bit
/// width.
-class IndexType : public Type::TypeBase<IndexType, Type> {
+class IndexType : public Type::TypeBase<IndexType, Type, TypeStorage> {
public:
using Base::Base;
// FloatType
//===----------------------------------------------------------------------===//
-class FloatType : public Type::TypeBase<FloatType, Type> {
+class FloatType : public Type::TypeBase<FloatType, Type, TypeStorage> {
public:
using Base::Base;
/// NoneType is a unit type, i.e. a type with exactly one possible value, where
/// its value does not have a defined dynamic representation.
-class NoneType : public Type::TypeBase<NoneType, Type> {
+class NoneType : public Type::TypeBase<NoneType, Type, TypeStorage> {
public:
using Base::Base;
};
/// Utility class for implementing types.
- template <typename ConcreteType, typename BaseType,
- typename StorageType = DefaultTypeStorage,
+ template <typename ConcreteType, typename BaseType, typename StorageType,
template <typename T> class... Traits>
using TypeBase = detail::StorageUserBase<ConcreteType, BaseType, StorageType,
detail::TypeUniquer, Traits...>;