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)
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 51 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 177 of file CIRAttrs.cpp.

Referenced by parseIntLiteralImpl().

◆ parseConstPtr() [1/2]

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

Definition at line 155 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 233 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 202 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 186 of file CIRAttrs.cpp.

References isTooLargeForType().

Referenced by parseIntLiteral().

◆ parseRecordMembers()

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

Definition at line 86 of file CIRAttrs.cpp.

◆ printConstPtr() [1/2]

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

Definition at line 165 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 229 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 209 of file CIRAttrs.cpp.

◆ printRecordMembers()

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

Definition at line 79 of file CIRAttrs.cpp.