clang 22.0.0git
Functions
CIRGenCXXExpr.cpp File Reference
#include "CIRGenCXXABI.h"
#include "CIRGenFunction.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/ExprCXX.h"
#include "clang/CIR/MissingFeatures.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 mlir::Value emitCXXNewAllocSize (CIRGenFunction &cgf, const CXXNewExpr *e, unsigned minElements, mlir::Value &numElements, mlir::Value &sizeWithoutCookie)
 
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 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.
 

Function Documentation

◆ commonBuildCXXMemberOrOperatorCall()

static MemberCallInfo commonBuildCXXMemberOrOperatorCall ( CIRGenFunction cgf,
const CXXMethodDecl md,
mlir::Value  thisPtr,
mlir::Value  implicitParam,
QualType  implicitParamTy,
const CallExpr ce,
CallArgList args,
CallArgList rtlArgs 
)
static

◆ emitCXXNewAllocSize()

static mlir::Value emitCXXNewAllocSize ( CIRGenFunction cgf,
const CXXNewExpr e,
unsigned  minElements,
mlir::Value numElements,
mlir::Value sizeWithoutCookie 
)
static

◆ emitNewDeleteCall()

static RValue emitNewDeleteCall ( CIRGenFunction cgf,
const FunctionDecl calleeDecl,
const FunctionProtoType calleeType,
const CallArgList args 
)
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 295 of file CIRGenCXXExpr.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().

◆ emitNewInitializer()

static void emitNewInitializer ( CIRGenFunction cgf,
const CXXNewExpr e,
QualType  elementType,
mlir::Type  elementTy,
Address  newPtr,
mlir::Value  numElements,
mlir::Value  allocSizeWithoutCookie 
)
static

◆ storeAnyExprIntoOneUnit()

static void storeAnyExprIntoOneUnit ( CIRGenFunction cgf,
const Expr init,
QualType  allocType,
Address  newPtr,
AggValueSlot::Overlap_t  mayOverlap 
)
static