|
clang 24.0.0git
|
#include "clang/CIR/Dialect/IR/CIRTypes.h"#include "mlir/Dialect/Ptr/IR/MemorySpaceInterfaces.h"#include "mlir/IR/BuiltinAttributes.h"#include "mlir/IR/DialectImplementation.h"#include "mlir/IR/MLIRContext.h"#include "mlir/Support/LLVM.h"#include "clang/Basic/AddressSpaces.h"#include "clang/CIR/Dialect/IR/CIRAttrs.h"#include "clang/CIR/Dialect/IR/CIRDialect.h"#include "clang/CIR/Dialect/IR/CIROpsEnums.h"#include "clang/CIR/Dialect/IR/CIRTypesDetails.h"#include "clang/CIR/MissingFeatures.h"#include "llvm/ADT/APFloat.h"#include "llvm/ADT/APInt.h"#include "llvm/ADT/APSInt.h"#include "llvm/ADT/TypeSwitch.h"#include "llvm/Support/MathExtras.h"#include "clang/CIR/Dialect/IR/CIRTypeConstraints.cpp.inc"#include "clang/CIR/Dialect/IR/CIROpsTypes.cpp.inc"Go to the source code of this file.
Namespaces | |
| namespace | cir |
Macros | |
| #define | GET_TYPEDEF_CLASSES |
| #define | GET_TYPEDEF_LIST |
Functions | |
| static bool | isPureCIRType (mlir::Type ty) |
| static mlir::ParseResult | parseFuncTypeParams (mlir::AsmParser &p, llvm::SmallVector< mlir::Type > ¶ms, bool &isVarArg) |
| static void | printFuncTypeParams (mlir::AsmPrinter &p, mlir::ArrayRef< mlir::Type > params, bool isVarArg) |
| mlir::ParseResult | parseAddressSpaceValue (mlir::AsmParser &p, mlir::ptr::MemorySpaceAttrInterface &attr) |
| void | printAddressSpaceValue (mlir::AsmPrinter &printer, mlir::ptr::MemorySpaceAttrInterface attr) |
| mlir::ParseResult | parseTargetAddressSpace (mlir::AsmParser &p, cir::TargetAddressSpaceAttr &attr) |
| void | printTargetAddressSpace (mlir::AsmPrinter &p, cir::TargetAddressSpaceAttr attr) |
| static mlir::LogicalResult | verifyRecordMemberKinds (function_ref< mlir::InFlightDiagnostic()> emitError, size_t numMembers, llvm::ArrayRef< RecordMemberKind > memberKinds) |
| An incomplete record has no members, so a kind for one is caught by the same check. | |
| static std::optional< RecordMemberKind > | parseMemberKind (mlir::AsmParser &parser) |
| static mlir::ParseResult | parseRecordBody (mlir::AsmParser &parser, bool &incomplete, llvm::SmallVector< mlir::Type > &members, llvm::SmallVectorImpl< RecordMemberKind > &memberKinds) |
Parse "incomplete" or "{mark type, mark type, ...}", writing results into incomplete, members and memberKinds. | |
| template<typename RecordTy> | |
| static void | printRecordBody (mlir::AsmPrinter &printer, RecordTy self, mlir::StringAttr name, bool hasClassPrefix, bool isPacked, bool isIncomplete, llvm::ArrayRef< mlir::Type > members, mlir::Type padding, llvm::ArrayRef< RecordMemberKind > memberKinds) |
| Print a complete CIR record body: '<' ['class '] [name] ['packed '] body '>' where body is "incomplete" or "{[mark] members}[, padding = {type}]". | |
| static mlir::Type | getMethodLayoutType (mlir::MLIRContext *ctx) |
| static mlir::Type | getDataMemberLayoutType (const mlir::DataLayout &dataLayout, mlir::MLIRContext *ctx) |
| mlir::OptionalParseResult | parseGlobalAddressSpaceValue (mlir::AsmParser &p, mlir::ptr::MemorySpaceAttrInterface &attr) |
| void | printGlobalAddressSpaceValue (mlir::AsmPrinter &printer, cir::GlobalOp, mlir::ptr::MemorySpaceAttrInterface attr) |
Variables | |
| static const llvm::StringRef | memberKindMarks [] |
| The keywords that spell a member kind. | |
| #define GET_TYPEDEF_CLASSES |
Definition at line 126 of file CIRTypes.cpp.
| #define GET_TYPEDEF_LIST |
|
static |
Definition at line 1321 of file CIRTypes.cpp.
|
static |
Definition at line 1276 of file CIRTypes.cpp.
References cir::RecordType::getAllDataKinds().
|
static |
Definition at line 64 of file CIRTypes.cpp.
| mlir::ParseResult parseAddressSpaceValue | ( | mlir::AsmParser & | p, |
| mlir::ptr::MemorySpaceAttrInterface & | attr ) |
Definition at line 1530 of file CIRTypes.cpp.
|
static |
Definition at line 1193 of file CIRTypes.cpp.
| mlir::OptionalParseResult parseGlobalAddressSpaceValue | ( | mlir::AsmParser & | p, |
| mlir::ptr::MemorySpaceAttrInterface & | attr ) |
Definition at line 1598 of file CIRTypes.cpp.
References parseAddressSpaceValue().
|
static |
|
static |
Parse "incomplete" or "{mark type, mark type, ...}", writing results into incomplete, members and memberKinds.
Returns failure if member parsing fails.
Definition at line 206 of file CIRTypes.cpp.
References kind, and parseMemberKind().
| mlir::ParseResult parseTargetAddressSpace | ( | mlir::AsmParser & | p, |
| cir::TargetAddressSpaceAttr & | attr ) |
| void printAddressSpaceValue | ( | mlir::AsmPrinter & | printer, |
| mlir::ptr::MemorySpaceAttrInterface | attr ) |
Definition at line 1578 of file CIRTypes.cpp.
|
static |
Definition at line 1213 of file CIRTypes.cpp.
| void printGlobalAddressSpaceValue | ( | mlir::AsmPrinter & | printer, |
| cir::GlobalOp | op, | ||
| mlir::ptr::MemorySpaceAttrInterface | attr ) |
Definition at line 1607 of file CIRTypes.cpp.
References printAddressSpaceValue().
|
static |
Print a complete CIR record body: '<' ['class '] [name] ['packed '] body '>' where body is "incomplete" or "{[mark] members}[, padding = {type}]".
RecordTy must be a mutable MLIR type (StructType or UnionType).
Definition at line 230 of file CIRTypes.cpp.
| void printTargetAddressSpace | ( | mlir::AsmPrinter & | p, |
| cir::TargetAddressSpaceAttr | attr ) |
|
static |
An incomplete record has no members, so a kind for one is caught by the same check.
Definition at line 176 of file CIRTypes.cpp.
|
static |
The keywords that spell a member kind.
A union's tail-padding slot probes for one of these to reject it, since that slot is not a member.
Definition at line 187 of file CIRTypes.cpp.