MLIR  16.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:
+ Collaboration 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...
 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 326 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 331 of file AttributeDetail.h.

Constructor & Destructor Documentation

◆ StringAttrStorage()

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

Definition at line 327 of file AttributeDetail.h.

Member Function Documentation

◆ construct()

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

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

Definition at line 341 of file AttributeDetail.h.

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

◆ hashKey()

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

Definition at line 335 of file AttributeDetail.h.

◆ initialize()

void StringAttrStorage::initialize ( MLIRContext context)

◆ operator==()

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

Definition at line 332 of file AttributeDetail.h.

References mlir::detail::DenseElementsAttributeStorage::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 356 of file AttributeDetail.h.

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

◆ type

Type mlir::detail::StringAttrStorage::type

The type of the string.

Definition at line 351 of file AttributeDetail.h.

◆ value

StringRef mlir::detail::StringAttrStorage::value

The raw string value.

Definition at line 353 of file AttributeDetail.h.

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