|
clang 23.0.0git
|
#include "CIRGenCXXABI.h"#include "CIRGenConstantEmitter.h"#include "CIRGenFunction.h"#include "clang/AST/CharUnits.h"#include "clang/AST/DeclCXX.h"#include "clang/AST/ExprCXX.h"#include "clang/AST/ExprObjC.h"#include "clang/Basic/OperatorKinds.h"#include "clang/CIR/MissingFeatures.h"#include "llvm/Support/TrailingObjects.h"Go to the source code of this file.
Functions | |
| static MemberCallInfo | commonBuildCXXMemberOrOperatorCall (CIRGenFunction &cgf, const CXXMethodDecl *md, mlir::Value thisPtr, mlir::Value implicitParam, QualType implicitParamTy, const CallExpr *ce, CallArgList &args, CallArgList *rtlArgs) |
| static void | emitNullBaseClassInitialization (CIRGenFunction &cgf, Address destPtr, const CXXRecordDecl *base) |
| static CharUnits | calculateCookiePadding (CIRGenFunction &cgf, const CXXNewExpr *e) |
| static mlir::Value | emitCXXNewAllocSize (CIRGenFunction &cgf, const CXXNewExpr *e, unsigned minElements, mlir::Value &numElements, mlir::Value &sizeWithoutCookie) |
| static RValue | emitNewDeleteCall (CIRGenFunction &cgf, const FunctionDecl *calleeDecl, const FunctionProtoType *calleeType, const CallArgList &args) |
| Emit a call to an operator new or operator delete function, as implicitly created by new-expressions and delete-expressions. | |
| static void | enterNewDeleteCleanup (CIRGenFunction &cgf, const CXXNewExpr *e, Address newPtr, mlir::Value allocSize, CharUnits allocAlign, const CallArgList &newArgs) |
| Enter a cleanup to call 'operator delete' if the initializer in a new-expression throws. | |
| static void | storeAnyExprIntoOneUnit (CIRGenFunction &cgf, const Expr *init, QualType allocType, Address newPtr, AggValueSlot::Overlap_t mayOverlap) |
| static void | emitNewInitializer (CIRGenFunction &cgf, const CXXNewExpr *e, QualType elementType, mlir::Type elementTy, Address newPtr, mlir::Value numElements, mlir::Value allocSizeWithoutCookie) |
| static void | emitObjectDelete (CIRGenFunction &cgf, const CXXDeleteExpr *de, Address ptr, QualType elementType) |
| Emit the code for deleting a single object. | |
| static mlir::Value | emitDynamicCastToNull (CIRGenFunction &cgf, mlir::Location loc, QualType destTy) |
| static mlir::Value | emitCXXTypeidFromVTable (CIRGenFunction &cgf, const Expr *e, mlir::Type typeInfoPtrTy, bool hasNullCheck) |
|
static |
Definition at line 414 of file CIRGenExprCXX.cpp.
References clang::CIRGen::CIRGenFunction::cgm, clang::CIRGen::CIRGenCXXABI::getArrayCookieSize(), clang::CIRGen::CIRGenModule::getCXXABI(), clang::CXXNewExpr::getOperatorNew(), clang::CXXNewExpr::isArray(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), and clang::CharUnits::Zero().
Referenced by emitCXXNewAllocSize().
|
static |
Definition at line 36 of file CIRGenExprCXX.cpp.
References clang::CIRGen::CallArgList::add(), clang::CIRGen::CallArgList::addFrom(), clang::CallExpr::arguments(), clang::Type::castAs(), clang::CIRGen::CIRGenFunction::cgm, clang::CIRGen::CIRGenTypes::deriveThisType(), clang::CIRGen::CIRGenFunction::emitCallArgs(), clang::CIRGen::RValue::get(), clang::CIRGen::CIRGenModule::getCXXABI(), clang::CallExpr::getDirectCallee(), clang::CIRGen::RequiredArgs::getFromProtoWithExtraSlots(), clang::CIRGen::CIRGenCXXABI::getThisArgumentTypeForMethod(), clang::ValueDecl::getType(), clang::CIRGen::CIRGenFunction::getTypes(), clang::isa(), and clang::CXXMethodDecl::isInstance().
Referenced by clang::CIRGen::CIRGenFunction::emitCXXDestructorCall(), and clang::CIRGen::CIRGenFunction::emitCXXMemberOrOperatorCall().
|
static |
Definition at line 427 of file CIRGenExprCXX.cpp.
References calculateCookiePadding(), clang::CIRGen::CIRGenFunction::cgm, cir::CIRBaseBuilderTy::createCompare(), cir::CIRBaseBuilderTy::createMul(), cir::CIRBaseBuilderTy::createOr(), cir::CIRBaseBuilderTy::createSelect(), clang::CIRGen::CIRGenFunction::emitScalarExpr(), clang::CXXNewExpr::getAllocatedType(), clang::CXXNewExpr::getArraySize(), clang::ASTContext::getAsConstantArrayType(), clang::CIRGen::CIRGenFunction::getBuilder(), cir::CIRBaseBuilderTy::getConstant(), clang::CIRGen::CIRGenBuilderTy::getConstInt(), clang::CIRGen::CIRGenFunction::getContext(), clang::CIRGen::CIRGenModule::getDataLayout(), clang::CIRGen::CIRGenFunction::getLoc(), clang::CharUnits::getQuantity(), clang::CXXNewExpr::getSourceRange(), clang::Expr::getType(), cir::CIRDataLayout::getTypeSizeInBits(), clang::ASTContext::getTypeSizeInChars(), clang::CXXNewExpr::isArray(), clang::CharUnits::isOne(), clang::CIRGen::CIRGenTypeCache::sizeTy, clang::CIRGen::ConstantEmitter::tryEmitAbstract(), and clang::ast_matchers::type.
Referenced by clang::CIRGen::CIRGenFunction::emitCXXNewExpr().
|
static |
Definition at line 1528 of file CIRGenExprCXX.cpp.
References clang::CIRGen::CIRGenFunction::cgm, cir::CIRBaseBuilderTy::createPtrIsNull(), clang::CIRGen::CIRGenFunction::emitLValue(), clang::CIRGen::CIRGenCXXABI::emitTypeid(), clang::CIRGen::LValue::getAddress(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenModule::getCXXABI(), clang::CIRGen::CIRGenFunction::getLoc(), clang::CIRGen::Address::getPointer(), clang::Stmt::getSourceRange(), clang::Expr::getType(), cir::MissingFeatures::sanitizers(), and clang::CIRGen::CIRGenCXXABI::shouldTypeidBeNullChecked().
Referenced by clang::CIRGen::CIRGenFunction::emitCXXTypeidExpr().
|
static |
C++ [expr.dynamic.cast]p9: A failed cast to reference type throws std::bad_cast
Definition at line 1470 of file CIRGenExprCXX.cpp.
References clang::CIRGen::CIRGenFunction::cgm, clang::CIRGen::CIRGenFunction::convertType(), clang::CIRGen::CIRGenCXXABI::emitBadCastCall(), clang::CIRGen::CIRGenFunction::getBuilder(), clang::CIRGen::CIRGenModule::getCXXABI(), cir::CIRBaseBuilderTy::getNullPtr(), and clang::Type::isPointerType().
Referenced by clang::CIRGen::CIRGenFunction::emitDynamicCast().
|
static |
Emit a call to an operator new or operator delete function, as implicitly created by new-expressions and delete-expressions.
C++1y [expr.new]p10: [In a new-expression,] an implementation is allowed to omit a call to a replaceable global allocation function.
We model such elidable calls with the 'builtin' attribute.
Definition at line 653 of file CIRGenExprCXX.cpp.
References clang::CIRGen::CIRGenTypes::arrangeFreeFunctionCall(), cir::MissingFeatures::attributeBuiltin(), clang::CIRGen::CIRGenFunction::cgm, clang::CIRGen::CIRGenFunction::emitCall(), clang::CIRGen::CIRGenCallee::forDirect(), clang::CIRGen::CIRGenModule::getAddrOfFunction(), and clang::CIRGen::CIRGenModule::getTypes().
Referenced by clang::CIRGen::CIRGenFunction::emitCXXNewExpr(), clang::CIRGen::CIRGenFunction::emitDeleteCall(), and clang::CIRGen::CIRGenFunction::emitNewOrDeleteBuiltinCall().
|
static |
Definition at line 1063 of file CIRGenExprCXX.cpp.
References clang::CIRGen::AggValueSlot::DoesNotOverlap, clang::CIRGen::CIRGenFunction::emitNewArrayInitializer(), cir::MissingFeatures::generateDebugInfo(), clang::CXXNewExpr::getAllocatedType(), clang::CXXNewExpr::getInitializer(), clang::CXXNewExpr::isArray(), and storeAnyExprIntoOneUnit().
Referenced by clang::CIRGen::CIRGenFunction::emitCXXNewExpr().
|
static |
Definition at line 293 of file CIRGenExprCXX.cpp.
References clang::CIRGen::CIRGenFunction::cgm, clang::CIRGen::CIRGenBuilderTy::createStore(), clang::CIRGen::CIRGenModule::emitNullConstantForBase(), clang::CIRGen::CIRGenModule::errorNYI(), clang::ASTContext::getASTRecordLayout(), clang::TypeDecl::getBeginLoc(), clang::CIRGen::CIRGenFunction::getBuilder(), cir::CIRBaseBuilderTy::getConstant(), clang::CIRGen::CIRGenFunction::getContext(), clang::CIRGen::CIRGenFunction::getLoc(), clang::ASTRecordLayout::getNonVirtualSize(), clang::TagDecl::getSourceRange(), clang::CXXRecordDecl::isEmpty(), clang::CIRGen::CIRGenBuilderTy::isNullValue(), cir::MissingFeatures::msabi(), and clang::CharUnits::Zero().
Referenced by clang::CIRGen::CIRGenFunction::emitCXXConstructExpr().
|
static |
Emit the code for deleting a single object.
Definition at line 1137 of file CIRGenExprCXX.cpp.
References clang::CIRGen::CIRGenFunction::cgm, cir::MissingFeatures::devirtualizeDestructor(), clang::Dtor_Complete, clang::CIRGen::CIRGenFunction::ehStack, clang::CIRGen::CIRGenFunction::emitCXXDestructorCall(), cir::MissingFeatures::emitNullCheckForDeleteCalls(), cir::MissingFeatures::emitTypeCheck(), clang::CIRGen::CIRGenCXXABI::emitVirtualObjectDelete(), clang::CIRGen::CIRGenModule::errorNYI(), clang::Type::getAsCXXRecordDecl(), clang::CIRGen::CIRGenModule::getCXXABI(), clang::QualType::getObjCLifetime(), clang::CXXDeleteExpr::getOperatorDelete(), clang::CIRGen::Address::getPointer(), clang::Stmt::getSourceRange(), clang::FunctionDecl::isDestroyingOperatorDelete(), clang::CXXMethodDecl::isVirtual(), clang::CIRGen::NormalAndEHCleanup, cir::MissingFeatures::objCLifetime(), and clang::CIRGen::CIRGenFunction::popCleanupBlock().
Referenced by clang::CIRGen::CIRGenFunction::emitCXXDeleteExpr().
|
static |
Enter a cleanup to call 'operator delete' if the initializer in a new-expression throws.
Definition at line 822 of file CIRGenExprCXX.cpp.
References clang::CIRGen::CIRGenFunction::cgm, clang::CIRGen::EHCleanup, clang::CIRGen::CIRGenFunction::ehStack, clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::RValue::get(), clang::CIRGen::CIRGenFunction::getLoc(), clang::CXXNewExpr::getNumImplicitArgs(), clang::CXXNewExpr::getNumPlacementArgs(), clang::CXXNewExpr::getOperatorDelete(), clang::CIRGen::Address::getPointer(), clang::CXXNewExpr::getSourceRange(), clang::CXXNewExpr::implicitAllocationParameters(), clang::CIRGen::CIRGenFunction::isInConditionalBranch(), clang::CIRGen::EHScopeStack::pushCleanupWithExtra(), and cir::MissingFeatures::typeAwareAllocation().
Referenced by clang::CIRGen::CIRGenFunction::emitCXXNewExpr().
|
static |
Definition at line 854 of file CIRGenExprCXX.cpp.
References cir::MissingFeatures::aggValueSlotGC(), clang::CIRGen::CIRGenFunction::emitAggExpr(), clang::CIRGen::CIRGenFunction::emitComplexExprIntoLValue(), clang::CIRGen::CIRGenFunction::emitScalarInit(), clang::CIRGen::AggValueSlot::forAddr(), clang::CIRGen::CIRGenFunction::getEvaluationKind(), clang::CIRGen::CIRGenFunction::getLoc(), clang::QualType::getQualifiers(), clang::Stmt::getSourceRange(), clang::CIRGen::AggValueSlot::IsDestructed, clang::CIRGen::AggValueSlot::IsNotAliased, clang::CIRGen::AggValueSlot::IsNotZeroed, clang::CIRGen::CIRGenFunction::makeAddrLValue(), cir::MissingFeatures::sanitizers(), cir::TEK_Aggregate, cir::TEK_Complex, and cir::TEK_Scalar.
Referenced by clang::CIRGen::CIRGenFunction::emitNewArrayInitializer(), and emitNewInitializer().