clang 23.0.0git
cir::detail::RecordTypeStorage Struct Reference

Type storage for CIR record types. More...

#include "clang/CIR/Dialect/IR/CIRTypesDetails.h"

Inheritance diagram for cir::detail::RecordTypeStorage:
[legend]

Classes

struct  KeyTy

Public Member Functions

 RecordTypeStorage (llvm::ArrayRef< mlir::Type > members, mlir::StringAttr name, bool incomplete, bool packed, bool padded, RecordType::RecordKind kind)
KeyTy getAsKey () const
bool operator== (const KeyTy &key) const
llvm::LogicalResult mutate (mlir::TypeStorageAllocator &allocator, llvm::ArrayRef< mlir::Type > members, bool packed, bool padded)
 Mutates the members and attributes an identified record.

Static Public Member Functions

static llvm::hash_code hashKey (const KeyTy &key)
static RecordTypeStorageconstruct (mlir::TypeStorageAllocator &allocator, const KeyTy &key)

Public Attributes

llvm::ArrayRef< mlir::Type > members
mlir::StringAttr name
bool incomplete
bool packed
bool padded
RecordType::RecordKind kind

Detailed Description

Type storage for CIR record types.

Definition at line 29 of file CIRTypesDetails.h.

Constructor & Destructor Documentation

◆ RecordTypeStorage()

cir::detail::RecordTypeStorage::RecordTypeStorage ( llvm::ArrayRef< mlir::Type > members,
mlir::StringAttr name,
bool incomplete,
bool packed,
bool padded,
RecordType::RecordKind kind )
inline

Definition at line 52 of file CIRTypesDetails.h.

References incomplete, kind, members, name, packed, and padded.

Referenced by construct().

Member Function Documentation

◆ construct()

◆ getAsKey()

KeyTy cir::detail::RecordTypeStorage::getAsKey ( ) const
inline

Definition at line 60 of file CIRTypesDetails.h.

References incomplete, kind, members, name, packed, and padded.

◆ hashKey()

◆ mutate()

llvm::LogicalResult cir::detail::RecordTypeStorage::mutate ( mlir::TypeStorageAllocator & allocator,
llvm::ArrayRef< mlir::Type > members,
bool packed,
bool padded )
inline

Mutates the members and attributes an identified record.

Once a record is mutated, it is marked as complete, preventing further mutations. Anonymous records are always complete and cannot be mutated. This method does not fail if a mutation of a complete record does not change the record.

Definition at line 92 of file CIRTypesDetails.h.

References incomplete, members, name, packed, and padded.

◆ operator==()

Member Data Documentation

◆ incomplete

bool cir::detail::RecordTypeStorage::incomplete

Definition at line 47 of file CIRTypesDetails.h.

Referenced by getAsKey(), mutate(), operator==(), and RecordTypeStorage().

◆ kind

RecordType::RecordKind cir::detail::RecordTypeStorage::kind

Definition at line 50 of file CIRTypesDetails.h.

Referenced by getAsKey(), operator==(), and RecordTypeStorage().

◆ members

llvm::ArrayRef<mlir::Type> cir::detail::RecordTypeStorage::members

Definition at line 45 of file CIRTypesDetails.h.

Referenced by getAsKey(), mutate(), operator==(), and RecordTypeStorage().

◆ name

mlir::StringAttr cir::detail::RecordTypeStorage::name

Definition at line 46 of file CIRTypesDetails.h.

Referenced by getAsKey(), mutate(), operator==(), and RecordTypeStorage().

◆ packed

bool cir::detail::RecordTypeStorage::packed

Definition at line 48 of file CIRTypesDetails.h.

Referenced by getAsKey(), mutate(), operator==(), and RecordTypeStorage().

◆ padded

bool cir::detail::RecordTypeStorage::padded

Definition at line 49 of file CIRTypesDetails.h.

Referenced by getAsKey(), mutate(), operator==(), and RecordTypeStorage().


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