clang 22.0.0git
|
#include "Address.h"
#include "CIRGenConstantEmitter.h"
#include "CIRGenFunction.h"
#include "CIRGenModule.h"
#include "CIRGenValue.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/Value.h"
#include "clang/AST/Attr.h"
#include "clang/AST/CharUnits.h"
#include "clang/AST/Decl.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/CIR/Dialect/IR/CIRDialect.h"
#include "clang/CIR/MissingFeatures.h"
#include <optional>
Go to the source code of this file.
Functions | |
static LValue | emitGlobalVarDeclLValue (CIRGenFunction &cgf, const Expr *e, const VarDecl *vd) |
static bool | isAAPCS (const TargetInfo &targetInfo) |
Helper method to check if the underlying ABI is AAPCS. | |
static cir::FuncOp | emitFunctionDeclPointer (CIRGenModule &cgm, GlobalDecl gd) |
static LValue | emitFunctionDeclLValue (CIRGenFunction &cgf, const Expr *e, GlobalDecl gd) |
static const Expr * | getSimpleArrayDecayOperand (const Expr *e) |
If the specified expr is a simple decay from an array to pointer, return the array subexpression. | |
static cir::IntAttr | getConstantIndexOrNull (mlir::Value idx) |
static CharUnits | getArrayElementAlign (CharUnits arrayAlign, mlir::Value idx, CharUnits eltSize) |
static QualType | getFixedSizeElementType (const ASTContext &astContext, const VariableArrayType *vla) |
static mlir::Value | emitArraySubscriptPtr (CIRGenFunction &cgf, mlir::Location beginLoc, mlir::Location endLoc, mlir::Value ptr, mlir::Type eltTy, mlir::Value idx, bool shouldDecay) |
static Address | emitArraySubscriptPtr (CIRGenFunction &cgf, mlir::Location beginLoc, mlir::Location endLoc, Address addr, QualType eltType, mlir::Value idx, mlir::Location loc, bool shouldDecay) |
static DeclRefExpr * | tryToConvertMemberExprToDeclRefExpr (CIRGenFunction &cgf, const MemberExpr *me) |
static Address | createReferenceTemporary (CIRGenFunction &cgf, const MaterializeTemporaryExpr *m, const Expr *inner) |
static void | pushTemporaryCleanup (CIRGenFunction &cgf, const MaterializeTemporaryExpr *m, const Expr *e, Address referenceTemporary) |
static bool | onlyHasInlineBuiltinDeclaration (const FunctionDecl *fd) |
|
static |
Definition at line 1203 of file CIRGenExpr.cpp.
References clang::CIRGen::CIRGenFunction::cgm, clang::CIRGen::CIRGenFunction::createMemTemp(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::CIRGenFunction::getCounterRefTmpAsString(), clang::MaterializeTemporaryExpr::getExtendingDecl(), clang::CIRGen::CIRGenFunction::getLoc(), clang::Stmt::getSourceRange(), clang::MaterializeTemporaryExpr::getStorageDuration(), clang::Expr::getType(), clang::CIRGen::Address::invalid(), clang::CIRGen::CIRGenFunction::localDeclMap, cir::MissingFeatures::mergeAllConstants(), clang::SD_Automatic, clang::SD_Dynamic, clang::SD_FullExpression, clang::SD_Static, and clang::SD_Thread.
Referenced by clang::CIRGen::CIRGenFunction::emitMaterializeTemporaryExpr(), and clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr().
|
static |
Definition at line 849 of file CIRGenExpr.cpp.
References clang::CIRGen::CIRGenFunction::convertTypeForMem(), emitArraySubscriptPtr(), clang::CIRGen::Address::getAlignment(), getArrayElementAlign(), clang::ASTContext::getAsVariableArrayType(), clang::CIRGen::CIRGenFunction::getContext(), clang::CIRGen::Address::getElementType(), getFixedSizeElementType(), clang::CIRGen::Address::getPointer(), clang::ASTContext::getTypeSizeInChars(), and cir::MissingFeatures::preservedAccessIndexRegion().
|
static |
Definition at line 836 of file CIRGenExpr.cpp.
References cir::MissingFeatures::emitCheckedInBoundsGEP(), clang::CIRGen::CIRGenBuilderTy::getArrayElement(), clang::CIRGen::CIRGenModule::getBuilder(), and clang::CIRGen::CIRGenFunction::getCIRGenModule().
Referenced by clang::CIRGen::CIRGenFunction::emitArraySubscriptExpr(), and emitArraySubscriptPtr().
|
static |
Definition at line 592 of file CIRGenExpr.cpp.
References clang::CIRGen::CIRGenFunction::cgm, clang::CIRGen::CIRGenFunction::convertType(), clang::CIRGen::Decl, emitFunctionDeclPointer(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenFunction::getContext(), clang::GlobalDecl::getDecl(), clang::ASTContext::getDeclAlign(), clang::CIRGen::CIRGenFunction::getLoc(), clang::Stmt::getSourceRange(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::CIRGen::CIRGenFunction::makeAddrLValue(), and cir::MissingFeatures::sanitizers().
Referenced by clang::CIRGen::CIRGenFunction::emitDeclRefLValue().
|
static |
Definition at line 587 of file CIRGenExpr.cpp.
References clang::CIRGen::CIRGenModule::getAddrOfFunction(), and cir::MissingFeatures::weakRefReference().
Referenced by emitFunctionDeclLValue().
|
static |
Definition at line 275 of file CIRGenExpr.cpp.
References cir::MissingFeatures::addressSpace(), clang::CIRGen::CIRGenFunction::cgm, clang::CIRGen::CIRGenFunction::convertTypeForMem(), cir::CIRBaseBuilderTy::createBitcast(), clang::CIRGen::Decl, clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::CIRGenModule::getAddrOfGlobalVar(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenFunction::getContext(), clang::ASTContext::getDeclAlign(), clang::CIRGen::CIRGenFunction::getLangOpts(), cir::CIRBaseBuilderTy::getPointerTo(), clang::Stmt::getSourceRange(), clang::VarDecl::getTLSKind(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::Type::isReferenceType(), clang::CIRGen::CIRGenFunction::makeAddrLValue(), cir::MissingFeatures::opGlobalThreadLocal(), cir::MissingFeatures::setObjCGCLValueClass(), and clang::VarDecl::TLS_Dynamic.
Referenced by clang::CIRGen::CIRGenFunction::emitDeclRefLValue().
|
static |
Definition at line 815 of file CIRGenExpr.cpp.
References clang::CharUnits::alignmentAtOffset(), clang::CharUnits::alignmentOfArrayElement(), and getConstantIndexOrNull().
Referenced by clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), emitArraySubscriptGEP(), emitArraySubscriptPtr(), and emitPointerArithmetic().
|
static |
Definition at line 808 of file CIRGenExpr.cpp.
Referenced by getArrayElementAlign().
|
static |
Definition at line 827 of file CIRGenExpr.cpp.
References clang::ASTContext::getAsVariableArrayType(), and clang::ArrayType::getElementType().
Referenced by emitArraySubscriptGEP(), and emitArraySubscriptPtr().
If the specified expr is a simple decay from an array to pointer, return the array subexpression.
FIXME: this could be abstracted into a common AST helper.
Definition at line 794 of file CIRGenExpr.cpp.
References clang::ast_matchers::castExpr, clang::Expr::getType(), and clang::Type::isVariableArrayType().
Referenced by clang::CIRGen::CIRGenFunction::emitArraySubscriptExpr().
|
static |
Helper method to check if the underlying ABI is AAPCS.
Definition at line 360 of file CIRGenExpr.cpp.
References clang::TargetInfo::getABI().
Referenced by clang::CIRGen::CIRGenFunction::emitLoadOfBitfieldLValue(), clang::CodeGen::CodeGenFunction::EmitLoadOfBitfieldLValue(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitStoreThroughBitfieldLValue(), and clang::CIRGen::CIRGenFunction::emitStoreThroughBitfieldLValue().
|
static |
Definition at line 1471 of file CIRGenExpr.cpp.
References clang::Redeclarable< decl_type >::getPreviousDecl().
|
static |
Definition at line 1243 of file CIRGenExpr.cpp.
References clang::CIRGen::CIRGenFunction::cgm, clang::CIRGen::CIRGenFunction::destroyCXXObject, clang::QualType::DK_none, clang::CIRGen::CIRGenModule::errorNYI(), clang::Type::getAsCXXRecordDecl(), clang::Type::getBaseElementTypeUnsafe(), clang::QualType::getObjCLifetime(), clang::Stmt::getSourceRange(), clang::MaterializeTemporaryExpr::getStorageDuration(), clang::Expr::getType(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::QualType::isDestructedType(), clang::CIRGen::NormalAndEHCleanup, clang::CIRGen::CIRGenFunction::pushDestroy(), clang::SD_Automatic, clang::SD_Dynamic, clang::SD_FullExpression, clang::SD_Static, and clang::SD_Thread.
Referenced by clang::CIRGen::CIRGenFunction::emitMaterializeTemporaryExpr(), and clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr().
|
static |
Definition at line 1119 of file CIRGenExpr.cpp.
References clang::DeclRefExpr::Create(), clang::CIRGen::CIRGenFunction::getContext(), clang::MemberExpr::getExprLoc(), clang::MemberExpr::getMemberDecl(), clang::Expr::getType(), clang::Expr::getValueKind(), and clang::MemberExpr::isNonOdrUse().
Referenced by clang::CIRGen::CIRGenFunction::emitMemberExpr(), clang::CodeGen::CodeGenFunction::EmitMemberExpr(), clang::CIRGen::CIRGenFunction::tryEmitAsConstant(), and clang::CodeGen::CodeGenFunction::tryEmitAsConstant().