MLIR  15.0.0git
Public Member Functions | Protected Member Functions | List of all members
mlir::AttributeStorage Class Reference

Base storage class appearing in an attribute. More...

#include "mlir/IR/AttributeSupport.h"

+ Inheritance diagram for mlir::AttributeStorage:
+ Collaboration diagram for mlir::AttributeStorage:

Public Member Functions

Type getType () const
 Get the type of this attribute. More...
 
const AbstractAttributegetAbstractAttribute () const
 Return the abstract descriptor for this attribute. More...
 

Protected Member Functions

 AttributeStorage (Type type=nullptr)
 Construct a new attribute storage instance with the given type. More...
 
void setType (Type newType)
 Set the type of this attribute. More...
 
void initializeAbstractAttribute (const AbstractAttribute &abstractAttr)
 Set the abstract attribute for this storage instance. More...
 
void initialize (MLIRContext *context)
 Default initialization for attribute storage classes that require no additional initialization. More...
 
- Protected Member Functions inherited from mlir::StorageUniquer::BaseStorage
 BaseStorage ()=default
 

Detailed Description

Base storage class appearing in an attribute.

Derived storage classes should only be constructed within the context of the AttributeUniquer.

Definition at line 127 of file AttributeSupport.h.

Constructor & Destructor Documentation

◆ AttributeStorage()

mlir::AttributeStorage::AttributeStorage ( Type  type = nullptr)
inlineprotected

Construct a new attribute storage instance with the given type.

Note: All attributes require a valid type. If no type is provided here, the type of the attribute will automatically default to NoneType upon initialization in the uniquer.

Definition at line 146 of file AttributeSupport.h.

Member Function Documentation

◆ getAbstractAttribute()

const AbstractAttribute& mlir::AttributeStorage::getAbstractAttribute ( ) const
inline

Return the abstract descriptor for this attribute.

Definition at line 136 of file AttributeSupport.h.

◆ getType()

Type mlir::AttributeStorage::getType ( ) const
inline

◆ initialize()

void mlir::AttributeStorage::initialize ( MLIRContext context)
inlineprotected

Default initialization for attribute storage classes that require no additional initialization.

Definition at line 159 of file AttributeSupport.h.

Referenced by mlir::detail::StringAttrStorage::construct().

◆ initializeAbstractAttribute()

void mlir::AttributeStorage::initializeAbstractAttribute ( const AbstractAttribute abstractAttr)
inlineprotected

Set the abstract attribute for this storage instance.

This is used by the AttributeUniquer when initializing a newly constructed storage object.

Definition at line 153 of file AttributeSupport.h.

Referenced by mlir::MLIRContext::getAttributeUniquer().

◆ setType()

void mlir::AttributeStorage::setType ( Type  newType)
inlineprotected

Set the type of this attribute.

Definition at line 149 of file AttributeSupport.h.

Referenced by mlir::MLIRContext::getAttributeUniquer().


The documentation for this class was generated from the following file: