|
clang 23.0.0git
|
C++ view class that accepts both !cir.struct and !cir.union types. More...
#include "clang/CIR/Dialect/IR/CIRTypes.h"
Public Member Functions | |
| RecordType (StructType t) | |
| RecordType (UnionType t) | |
| llvm::ArrayRef< mlir::Type > | getMembers () const |
| mlir::StringAttr | getName () const |
| bool | isIncomplete () const |
| bool | isComplete () const |
| bool | getPacked () const |
| bool | getPadded () const |
| bool | isClass () const |
| bool | isStruct () const |
| bool | isUnion () const |
| size_t | getNumElements () const |
| mlir::Type | getElementType (size_t idx) const |
| std::string | getKindAsStr () const |
| std::string | getPrefixedName () const |
| void | complete (llvm::ArrayRef< mlir::Type > members, bool packed, bool padded, mlir::Type padding={}) |
| uint64_t | getElementOffset (const mlir::DataLayout &dataLayout, unsigned idx) const |
| bool | isLayoutIdentical (const RecordType &other) |
| bool | isABIConvertedRecord () const |
| mlir::StringAttr | getABIConvertedName () const |
| void | removeABIConversionNamePrefix () |
Static Public Member Functions | |
| static bool | classof (mlir::Type t) |
C++ view class that accepts both !cir.struct and !cir.union types.
Follows the MLIR BaseMemRefType pattern: StructType and UnionType are the concrete tablegen types; RecordType is a hand-written view class that covers both. Use it when code must handle either kind generically.
Methods that are common to both types are forwarded through dyn_cast dispatch. Type-specific methods (getPadding, getUnionStorageType) are only available on the concrete type.
Definition at line 93 of file CIRTypes.h.
|
inline |
Definition at line 101 of file CIRTypes.h.
Referenced by isLayoutIdentical().
|
inline |
Definition at line 103 of file CIRTypes.h.
|
inlinestatic |
Definition at line 105 of file CIRTypes.h.
| void RecordType::complete | ( | llvm::ArrayRef< mlir::Type > | members, |
| bool | packed, | ||
| bool | padded, | ||
| mlir::Type | padding = {} ) |
Definition at line 535 of file CIRTypes.cpp.
References s.
Referenced by clang::CIRGen::CIRGenTypes::computeRecordLayout().
| mlir::StringAttr RecordType::getABIConvertedName | ( | ) | const |
Definition at line 568 of file CIRTypes.cpp.
References s.
| uint64_t RecordType::getElementOffset | ( | const mlir::DataLayout & | dataLayout, |
| unsigned | idx ) const |
Definition at line 544 of file CIRTypes.cpp.
Referenced by clang::CIRGen::CIRGenFunction::emitAddrOfFieldStorage().
|
inline |
Definition at line 121 of file CIRTypes.h.
References getMembers().
| std::string RecordType::getKindAsStr | ( | ) | const |
Definition at line 527 of file CIRTypes.cpp.
Referenced by getPrefixedName().
| llvm::ArrayRef< mlir::Type > RecordType::getMembers | ( | ) | const |
Definition at line 492 of file CIRTypes.cpp.
References s.
Referenced by clang::CIRGen::CIRGenFunction::emitAddrOfFieldStorage(), getElementType(), and getNumElements().
| mlir::StringAttr RecordType::getName | ( | ) | const |
Definition at line 497 of file CIRTypes.cpp.
References s.
Referenced by clang::CIRGen::CIRGenTypes::computeRecordLayout(), and getPrefixedName().
|
inline |
Definition at line 120 of file CIRTypes.h.
References getMembers().
| bool RecordType::getPacked | ( | ) | const |
Definition at line 507 of file CIRTypes.cpp.
References s.
| bool RecordType::getPadded | ( | ) | const |
Definition at line 512 of file CIRTypes.cpp.
References s.
| std::string RecordType::getPrefixedName | ( | ) | const |
Definition at line 532 of file CIRTypes.cpp.
References getKindAsStr(), and getName().
| bool RecordType::isABIConvertedRecord | ( | ) | const |
Definition at line 563 of file CIRTypes.cpp.
References s.
| bool RecordType::isClass | ( | ) | const |
Definition at line 517 of file CIRTypes.cpp.
References s.
|
inline |
Definition at line 112 of file CIRTypes.h.
References isIncomplete().
Referenced by clang::CIRGen::CIRGenTypes::convertRecordDeclType().
| bool RecordType::isIncomplete | ( | ) | const |
Definition at line 502 of file CIRTypes.cpp.
References s.
Referenced by clang::CIRGen::CIRGenTypes::computeRecordLayout(), and isComplete().
| bool RecordType::isLayoutIdentical | ( | const RecordType & | other | ) |
Definition at line 550 of file CIRTypes.cpp.
References RecordType(), and s.
| bool RecordType::isStruct | ( | ) | const |
Definition at line 522 of file CIRTypes.cpp.
References s.
|
inline |
Definition at line 118 of file CIRTypes.h.
| void RecordType::removeABIConversionNamePrefix | ( | ) |
Definition at line 573 of file CIRTypes.cpp.
References s.