MLIR 22.0.0git
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.

Public Member Functions

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

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.

Public Attributes

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

Additional Inherited Members

Protected Member Functions inherited from mlir::AttributeStorage
void initializeAbstractAttribute (const AbstractAttribute &abstractAttr)
 Set the abstract attribute for this storage instance.
void initialize (MLIRContext *context)
 Default initialization for attribute storage classes that require no additional initialization.
Protected Member Functions inherited from mlir::StorageUniquer::BaseStorage
 BaseStorage ()=default

Detailed Description

Definition at line 322 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 327 of file AttributeDetail.h.

Constructor & Destructor Documentation

◆ StringAttrStorage()

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

Definition at line 323 of file AttributeDetail.h.

References nullptr, referencedDialect, type, and value.

Referenced by construct().

Member Function Documentation

◆ construct()

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 337 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 331 of file AttributeDetail.h.

◆ initialize()

void StringAttrStorage::initialize ( MLIRContext * context)

Initialize the storage given an MLIRContext.

Definition at line 1161 of file MLIRContext.cpp.

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

◆ operator==()

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

Definition at line 328 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 352 of file AttributeDetail.h.

Referenced by mlir::MLIRContext::getOrLoadDialect(), initialize(), and StringAttrStorage().

◆ type

Type mlir::detail::StringAttrStorage::type

The type of the string.

Definition at line 347 of file AttributeDetail.h.

Referenced by operator==(), and StringAttrStorage().

◆ value

StringRef mlir::detail::StringAttrStorage::value

The raw string value.

Definition at line 349 of file AttributeDetail.h.

Referenced by initialize(), operator==(), and StringAttrStorage().


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