clang 22.0.0git
CIRAttrs.cpp File Reference
#include "clang/CIR/Dialect/IR/CIRDialect.h"
#include "mlir/IR/DialectImplementation.h"
#include "llvm/ADT/TypeSwitch.h"
#include "clang/CIR/Dialect/IR/CIROpsAttributes.cpp.inc"

Go to the source code of this file.

Macros

#define GET_ATTRDEF_CLASSES
#define GET_ATTRDEF_LIST

Functions

static void printRecordMembers (mlir::AsmPrinter &p, mlir::ArrayAttr members)
static mlir::ParseResult parseRecordMembers (mlir::AsmParser &parser, mlir::ArrayAttr &members)
static void printIntLiteral (mlir::AsmPrinter &p, llvm::APInt value, cir::IntTypeInterface ty)
static mlir::ParseResult parseIntLiteral (mlir::AsmParser &parser, llvm::APInt &value, cir::IntTypeInterface ty)
static void printFloatLiteral (mlir::AsmPrinter &p, llvm::APFloat value, mlir::Type ty)
static mlir::ParseResult parseFloatLiteral (mlir::AsmParser &parser, mlir::FailureOr< llvm::APFloat > &value, cir::FPTypeInterface fpType)
mlir::ParseResult parseTargetAddressSpace (mlir::AsmParser &p, cir::TargetAddressSpaceAttr &attr)
void printTargetAddressSpace (mlir::AsmPrinter &p, cir::TargetAddressSpaceAttr attr)
static mlir::ParseResult parseConstPtr (mlir::AsmParser &parser, mlir::IntegerAttr &value)
static void printConstPtr (mlir::AsmPrinter &p, mlir::IntegerAttr value)
static ParseResult parseConstPtr (AsmParser &parser, mlir::IntegerAttr &value)
static void printConstPtr (AsmPrinter &p, mlir::IntegerAttr value)
template<typename IntT>
static bool isTooLargeForType (const mlir::APInt &value, IntT expectedValue)
template<typename IntT>
static mlir::ParseResult parseIntLiteralImpl (mlir::AsmParser &p, llvm::APInt &value, cir::IntTypeInterface ty)
static void printFloatLiteral (AsmPrinter &p, APFloat value, Type ty)
static ParseResult parseFloatLiteral (AsmParser &parser, FailureOr< APFloat > &value, cir::FPTypeInterface fpType)

Macro Definition Documentation

◆ GET_ATTRDEF_CLASSES

#define GET_ATTRDEF_CLASSES

Definition at line 61 of file CIRAttrs.cpp.

◆ GET_ATTRDEF_LIST

#define GET_ATTRDEF_LIST

Function Documentation

◆ isTooLargeForType()

template<typename IntT>
bool isTooLargeForType ( const mlir::APInt & value,
IntT expectedValue )
static

Definition at line 187 of file CIRAttrs.cpp.

Referenced by parseIntLiteralImpl().

◆ parseConstPtr() [1/2]

ParseResult parseConstPtr ( AsmParser & parser,
mlir::IntegerAttr & value )
static

Definition at line 165 of file CIRAttrs.cpp.

◆ parseConstPtr() [2/2]

mlir::ParseResult parseConstPtr ( mlir::AsmParser & parser,
mlir::IntegerAttr & value )
static

◆ parseFloatLiteral() [1/2]

ParseResult parseFloatLiteral ( AsmParser & parser,
FailureOr< APFloat > & value,
cir::FPTypeInterface fpType )
static

Definition at line 243 of file CIRAttrs.cpp.

◆ parseFloatLiteral() [2/2]

mlir::ParseResult parseFloatLiteral ( mlir::AsmParser & parser,
mlir::FailureOr< llvm::APFloat > & value,
cir::FPTypeInterface fpType )
static

◆ parseIntLiteral()

mlir::ParseResult parseIntLiteral ( mlir::AsmParser & parser,
llvm::APInt & value,
cir::IntTypeInterface ty )
static

Definition at line 212 of file CIRAttrs.cpp.

References parseIntLiteralImpl().

◆ parseIntLiteralImpl()

template<typename IntT>
mlir::ParseResult parseIntLiteralImpl ( mlir::AsmParser & p,
llvm::APInt & value,
cir::IntTypeInterface ty )
static

Definition at line 196 of file CIRAttrs.cpp.

References isTooLargeForType().

Referenced by parseIntLiteral().

◆ parseRecordMembers()

ParseResult parseRecordMembers ( mlir::AsmParser & parser,
mlir::ArrayAttr & members )
static

Definition at line 96 of file CIRAttrs.cpp.

◆ parseTargetAddressSpace()

mlir::ParseResult parseTargetAddressSpace ( mlir::AsmParser & p,
cir::TargetAddressSpaceAttr & attr )

Definition at line 810 of file CIRTypes.cpp.

◆ printConstPtr() [1/2]

void printConstPtr ( AsmPrinter & p,
mlir::IntegerAttr value )
static

Definition at line 175 of file CIRAttrs.cpp.

◆ printConstPtr() [2/2]

void printConstPtr ( mlir::AsmPrinter & p,
mlir::IntegerAttr value )
static

◆ printFloatLiteral() [1/2]

void printFloatLiteral ( AsmPrinter & p,
APFloat value,
Type ty )
static

Definition at line 239 of file CIRAttrs.cpp.

◆ printFloatLiteral() [2/2]

void printFloatLiteral ( mlir::AsmPrinter & p,
llvm::APFloat value,
mlir::Type ty )
static

◆ printIntLiteral()

void printIntLiteral ( mlir::AsmPrinter & p,
llvm::APInt value,
cir::IntTypeInterface ty )
static

Definition at line 219 of file CIRAttrs.cpp.

◆ printRecordMembers()

void printRecordMembers ( mlir::AsmPrinter & p,
mlir::ArrayAttr members )
static

Definition at line 89 of file CIRAttrs.cpp.

◆ printTargetAddressSpace()

void printTargetAddressSpace ( mlir::AsmPrinter & p,
cir::TargetAddressSpaceAttr attr )

Definition at line 835 of file CIRTypes.cpp.