|
clang 23.0.0git
|
Public Member Functions | |
| ConstantEmitter (CIRGenFunction &cgf) | |
| Initialize this emission in the context of the given function. | |
| ConstantEmitter (CIRGenModule &cgm, CIRGenFunction *cgf=nullptr) | |
| ConstantEmitter (const ConstantEmitter &other)=delete | |
| ConstantEmitter & | operator= (const ConstantEmitter &other)=delete |
| ~ConstantEmitter () | |
| mlir::Attribute | tryEmitForInitializer (const VarDecl &d) |
| Try to emit the initializer of the given declaration as an abstract constant. | |
| mlir::Attribute | emitForInitializer (const APValue &value, QualType destType) |
| void | finalize (cir::GlobalOp gv) |
| mlir::Attribute | emitForMemory (mlir::Attribute c, QualType destType) |
| mlir::Attribute | emitNullForMemory (mlir::Location loc, QualType t) |
| mlir::Attribute | tryEmitAbstractForInitializer (const VarDecl &d) |
| Try to emit the initializer of the given declaration as an abstract constant. | |
| mlir::Attribute | emitAbstract (const Expr *e, QualType destType) |
| Emit the result of the given expression as an abstract constant, asserting that it succeeded. | |
| mlir::Attribute | emitAbstract (SourceLocation loc, const APValue &value, QualType destType) |
| mlir::Attribute | tryEmitConstantExpr (const ConstantExpr *ce) |
| mlir::Attribute | tryEmitPrivateForVarInit (const VarDecl &d) |
| mlir::TypedAttr | tryEmitPrivate (const Expr *e, QualType destType) |
| mlir::Attribute | tryEmitPrivate (const APValue &value, QualType destType) |
| mlir::Attribute | tryEmitPrivateForMemory (const Expr *e, QualType destTy) |
| mlir::Attribute | tryEmitPrivateForMemory (const APValue &value, QualType destTy) |
| mlir::Attribute | tryEmitAbstract (const Expr *e, QualType destType) |
Static Public Member Functions | |
| static mlir::Attribute | emitForMemory (CIRGenModule &cgm, mlir::Attribute c, clang::QualType destTy) |
| static mlir::Attribute | emitNullForMemory (mlir::Location loc, CIRGenModule &cgm, QualType t) |
Public Attributes | |
| CIRGenModule & | cgm |
| const CIRGenFunction * | cgf |
Definition at line 26 of file CIRGenConstantEmitter.h.
|
inline |
Initialize this emission in the context of the given function.
Use this if the expression might contain contextual references like block addresses or PredefinedExprs.
Definition at line 54 of file CIRGenConstantEmitter.h.
Referenced by ConstantEmitter(), and operator=().
|
inline |
Definition at line 56 of file CIRGenConstantEmitter.h.
|
delete |
References ConstantEmitter().
| ConstantEmitter::~ConstantEmitter | ( | ) |
Definition at line 1532 of file CIRGenExprConstant.cpp.
Emit the result of the given expression as an abstract constant, asserting that it succeeded.
This is only safe to do when the expression is known to be a constant expression with either a fairly simple type or a known simple form.
Definition at line 1722 of file CIRGenExprConstant.cpp.
References c, cgm, clang::Stmt::getSourceRange(), and tryEmitPrivate().
Referenced by clang::CIRGen::CIRGenFunction::emitDeclRefLValue(), clang::CIRGen::CIRGenFunction::tryEmitAsConstant(), and tryEmitConstantExpr().
| mlir::Attribute ConstantEmitter::emitAbstract | ( | SourceLocation | loc, |
| const APValue & | value, | ||
| QualType | destType ) |
Definition at line 1732 of file CIRGenExprConstant.cpp.
References c, cgm, and tryEmitPrivate().
Definition at line 1507 of file CIRGenExprConstant.cpp.
References c, and tryEmitPrivateForMemory().
|
static |
Definition at line 1762 of file CIRGenExprConstant.cpp.
References c, cgm, and clang::Type::getAs().
| mlir::Attribute ConstantEmitter::emitForMemory | ( | mlir::Attribute | c, |
| QualType | destType ) |
Definition at line 1751 of file CIRGenExprConstant.cpp.
References c, cgm, and clang::Type::getAs().
Referenced by emitNullForMemory(), tryEmitPrivateForMemory(), tryEmitPrivateForMemory(), and tryEmitPrivateForVarInit().
|
static |
Definition at line 1742 of file CIRGenExprConstant.cpp.
References cgm, and emitForMemory().
|
inline |
Definition at line 89 of file CIRGenConstantEmitter.h.
References cgm, and emitNullForMemory().
Referenced by emitNullForMemory().
| void ConstantEmitter::finalize | ( | cir::GlobalOp | gv | ) |
Definition at line 1515 of file CIRGenExprConstant.cpp.
Referenced by clang::CIRGen::CIRGenFunction::addInitializerToStaticVarDecl().
|
delete |
References c, cgm, and ConstantEmitter().
Definition at line 1687 of file CIRGenExprConstant.cpp.
References tryEmitPrivate().
Referenced by emitCXXNewAllocSize().
| mlir::Attribute ConstantEmitter::tryEmitAbstractForInitializer | ( | const VarDecl & | d | ) |
Try to emit the initializer of the given declaration as an abstract constant.
Definition at line 1527 of file CIRGenExprConstant.cpp.
References tryEmitPrivateForVarInit().
Referenced by clang::CIRGen::CIRGenFunction::emitAutoVarInit().
| mlir::Attribute ConstantEmitter::tryEmitConstantExpr | ( | const ConstantExpr * | ce | ) |
Definition at line 1693 of file CIRGenExprConstant.cpp.
References cgm, emitAbstract(), clang::ConstantExpr::getAPValueResult(), clang::ConstantExpr::getBeginLoc(), clang::Expr::getType(), clang::ConstantExpr::hasAPValueResult(), and clang::Expr::isGLValue().
| mlir::Attribute ConstantEmitter::tryEmitForInitializer | ( | const VarDecl & | d | ) |
Try to emit the initializer of the given declaration as an abstract constant.
If this succeeds, the emission must be finalized.
Definition at line 1502 of file CIRGenExprConstant.cpp.
References tryEmitPrivateForVarInit().
Referenced by clang::CIRGen::CIRGenFunction::addInitializerToStaticVarDecl().
Definition at line 1799 of file CIRGenExprConstant.cpp.
References clang::APValue::AddrLabelDiff, clang::APValue::Array, clang::cast(), clang::Type::castAs(), cgm, clang::APValue::ComplexFloat, clang::APValue::ComplexInt, clang::ast_matchers::complexType, cir::MissingFeatures::cxxABI(), clang::ast_matchers::fieldDecl, clang::APValue::FixedPoint, clang::APValue::Float, clang::APValue::getArrayFiller(), clang::APValue::getArrayInitializedElt(), clang::APValue::getArrayInitializedElts(), clang::APValue::getArraySize(), cir::CIRBaseBuilderTy::getCIRBoolAttr(), clang::APValue::getComplexFloatImag(), clang::APValue::getComplexFloatReal(), clang::APValue::getComplexIntImag(), clang::APValue::getComplexIntReal(), clang::CIRGen::CIRGenBuilderTy::getDataMemberAttr(), clang::ArrayType::getElementType(), clang::APValue::getFloat(), clang::APValue::getInt(), clang::APValue::getKind(), clang::APValue::getMemberPointerDecl(), clang::APValue::getVectorElt(), clang::APValue::getVectorLength(), cir::CIRBaseBuilderTy::getZeroInitAttr(), clang::APValue::hasArrayFiller(), clang::APValue::Indeterminate, clang::APValue::Int, clang::isa(), clang::APValue::isMemberPointerToDerivedMember(), clang::CIRGen::CIRGenBuilderTy::isNullValue(), clang::APValue::LValue, clang::APValue::Matrix, clang::APValue::MemberPointer, clang::APValue::None, clang::APValue::Struct, tryEmitPrivate(), tryEmitPrivateForMemory(), clang::APValue::Union, and clang::APValue::Vector.
Definition at line 1773 of file CIRGenExprConstant.cpp.
References c, cgm, clang::Expr::EvaluateAsLValue(), clang::Expr::EvaluateAsRValue(), clang::Expr::EvalStatus::hasSideEffects(), clang::Type::isReferenceType(), clang::Type::isVoidType(), tryEmitPrivate(), and clang::Expr::EvalResult::Val.
Referenced by emitAbstract(), emitAbstract(), tryEmitAbstract(), tryEmitPrivate(), tryEmitPrivate(), tryEmitPrivateForMemory(), and tryEmitPrivateForMemory().
Definition at line 1715 of file CIRGenExprConstant.cpp.
References c, cgm, emitForMemory(), getNonMemoryType(), and tryEmitPrivate().
Definition at line 1704 of file CIRGenExprConstant.cpp.
References c, cgm, emitForMemory(), getNonMemoryType(), and tryEmitPrivate().
Referenced by emitForInitializer(), tryEmitPrivate(), and tryEmitPrivateForVarInit().
| mlir::Attribute ConstantEmitter::tryEmitPrivateForVarInit | ( | const VarDecl & | d | ) |
Definition at line 1632 of file CIRGenExprConstant.cpp.
References c, clang::Type::castAsCXXRecordDecl(), cgm, emitForMemory(), clang::VarDecl::evaluateValue(), clang::VarDecl::getInit(), getNonMemoryType(), clang::ValueDecl::getType(), clang::VarDecl::hasConstantInitialization(), clang::VarDecl::hasLocalStorage(), clang::CXXConstructorDecl::isDefaultConstructor(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::FunctionDecl::isTrivial(), and tryEmitPrivateForMemory().
Referenced by tryEmitAbstractForInitializer(), and tryEmitForInitializer().
| const CIRGenFunction* clang::CIRGen::ConstantEmitter::cgf |
Definition at line 29 of file CIRGenConstantEmitter.h.
Referenced by ConstantEmitter(), and ConstantEmitter().
| CIRGenModule& clang::CIRGen::ConstantEmitter::cgm |
Definition at line 28 of file CIRGenConstantEmitter.h.
Referenced by ConstantEmitter(), ConstantEmitter(), emitAbstract(), emitAbstract(), emitForMemory(), emitForMemory(), emitNullForMemory(), emitNullForMemory(), operator=(), tryEmitConstantExpr(), tryEmitPrivate(), tryEmitPrivate(), tryEmitPrivateForMemory(), tryEmitPrivateForMemory(), and tryEmitPrivateForVarInit().