MLIR  19.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
mlir::detail::StringAttrStorage Struct Reference

#include "IR/AttributeDetail.h"

+ Inheritance diagram for mlir::detail::StringAttrStorage:

Public Types

using KeyTy = std::pair< StringRef, Type >
 The hash key is a tuple of the parameter types. More...
 

Public Member Functions

 StringAttrStorage (StringRef value, Type type)
 
bool operator== (const KeyTy &key) const
 
void initialize (MLIRContext *context)
 Initialize the storage given an MLIRContext. More...
 
- Public Member Functions inherited from mlir::AttributeStorage
const AbstractAttributegetAbstractAttribute () const
 Return the abstract descriptor for this attribute. More...
 

Static Public Member Functions

::llvm::hash_code hashKey (const KeyTy &key)
 
static StringAttrStorageconstruct (AttributeStorageAllocator &allocator, const KeyTy &key)
 Define a construction method for creating a new instance of this storage. More...
 

Public Attributes

Type type
 The type of the string. More...
 
StringRef value
 The raw string value. More...
 
DialectreferencedDialect
 If the string value contains a dialect namespace prefix (e.g. More...
 

Additional Inherited Members

- Protected Member Functions inherited from mlir::AttributeStorage
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

Definition at line 324 of file AttributeDetail.h.

Member Typedef Documentation

◆ KeyTy

using mlir::detail::StringAttrStorage::KeyTy = std::pair<StringRef, Type>

The hash key is a tuple of the parameter types.

Definition at line 329 of file AttributeDetail.h.

Constructor & Destructor Documentation

◆ StringAttrStorage()

mlir::detail::StringAttrStorage::StringAttrStorage ( StringRef  value,
Type  type 
)
inline

Definition at line 325 of file AttributeDetail.h.

Referenced by construct().

Member Function Documentation

◆ construct()

static StringAttrStorage* mlir::detail::StringAttrStorage::construct ( AttributeStorageAllocator allocator,
const KeyTy key 
)
inlinestatic

Define a construction method for creating a new instance of this storage.

Definition at line 339 of file AttributeDetail.h.

References mlir::StorageUniquer::StorageAllocator::allocate(), mlir::StorageUniquer::StorageAllocator::copyInto(), and StringAttrStorage().

◆ hashKey()

::llvm::hash_code mlir::detail::StringAttrStorage::hashKey ( const KeyTy key)
inlinestatic

Definition at line 333 of file AttributeDetail.h.

◆ initialize()

void StringAttrStorage::initialize ( MLIRContext context)

Initialize the storage given an MLIRContext.

Definition at line 1146 of file MLIRContext.cpp.

References mlir::MLIRContext::getImpl(), and mlir::MLIRContext::getLoadedDialect().

◆ operator==()

bool mlir::detail::StringAttrStorage::operator== ( const KeyTy key) const
inline

Definition at line 330 of file AttributeDetail.h.

References type, and value.

Member Data Documentation

◆ referencedDialect

Dialect* mlir::detail::StringAttrStorage::referencedDialect

If the string value contains a dialect namespace prefix (e.g.

dialect.blah), this is the dialect referenced.

Definition at line 354 of file AttributeDetail.h.

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

◆ type

Type mlir::detail::StringAttrStorage::type

The type of the string.

Definition at line 349 of file AttributeDetail.h.

Referenced by operator==().

◆ value

StringRef mlir::detail::StringAttrStorage::value

The raw string value.

Definition at line 351 of file AttributeDetail.h.

Referenced by operator==().


The documentation for this struct was generated from the following files: