28 bool forVirtualBase,
bool delegating,
CallArgList &args) {
31 for (
auto [idx, prefixArg] : llvm::enumerate(addedArgs.
prefix))
32 args.insert(args.begin() + 1 + idx,
34 for (
const auto &arg : addedArgs.
suffix)
52 &
cgm.getASTContext().Idents.get(
"this"),
54 params.push_back(thisDecl);
66 return cgm.getCIRLinkageForDeclarator(dtor, linkage);
77 mlir::Value thisPtr) {
79 assert(
getThisDecl(cgf) &&
"no 'this' variable for function");
102 "cannot handle aggregates");
103 mlir::Location loc = cgf.
getBuilder().getUnknownLoc();
Defines the clang::Expr interface and subclasses for C++ expressions.
mlir::Value getPointer() const
mlir::Type getElementType() const
virtual bool requiresArrayCookie(const CXXNewExpr *e)
virtual CharUnits getArrayCookieSizeImpl(QualType elementType)=0
Returns the extra size required in order to store the array cookie for the given type.
AddedStructorArgCounts addImplicitConstructorArgs(CIRGenFunction &cgf, const CXXConstructorDecl *d, CXXCtorType type, bool forVirtualBase, bool delegating, CallArgList &args)
clang::ImplicitParamDecl * getThisDecl(CIRGenFunction &cgf)
virtual AddedStructorArgs getImplicitConstructorArgs(CIRGenFunction &cgf, const CXXConstructorDecl *d, CXXCtorType type, bool forVirtualBase, bool delegating)=0
void setCXXABIThisValue(CIRGenFunction &cgf, mlir::Value thisPtr)
virtual void emitReturnFromThunk(CIRGenFunction &cgf, RValue rv, QualType resultType)
Emit a return from a thunk.
mlir::Value loadIncomingCXXThis(CIRGenFunction &cgf)
Loads the incoming C++ this pointer as it was passed by the caller.
virtual CatchTypeInfo getCatchAllTypeInfo()
virtual CharUnits getArrayCookieSize(const CXXNewExpr *e)
Returns the extra size required in order to store the array cookie for the given new-expression.
virtual cir::GlobalLinkageKind getCXXDestructorLinkage(GVALinkage linkage, const CXXDestructorDecl *dtor, CXXDtorType dt) const
void buildThisParam(CIRGenFunction &cgf, FunctionArgList ¶ms)
Build a parameter variable suitable for 'this'.
clang::GlobalDecl curGD
The GlobalDecl for the current function being compiled or the global variable currently being initial...
ImplicitParamDecl * cxxabiThisDecl
CXXThisDecl - When generating code for a C++ member function, this will hold the implicit 'this' decl...
Address getAddrOfLocalVar(const clang::VarDecl *vd)
Return the address of a local variable.
mlir::Location getLoc(clang::SourceLocation srcLoc)
Helpers to convert Clang's SourceLocation to a MLIR Location.
static bool hasAggregateEvaluationKind(clang::QualType type)
void emitReturnOfRValue(mlir::Location loc, RValue rv, QualType ty)
CIRGenBuilderTy & getBuilder()
mlir::Value cxxabiThisValue
void add(RValue rvalue, clang::QualType type)
Type for representing both the decl and type of parameters to a function.
This trivial value class is used to represent the result of an expression that is evaluated.
static RValue get(mlir::Value v)
Represents a C++ constructor within a class.
Represents a C++ destructor within a class.
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
QualType getAllocatedType() const
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
This is an opaque type for sizes expressed in character units.
static CharUnits Zero()
Construct a CharUnits quantity of zero.
SourceLocation getLocation() const
const Decl * getDecl() const
static ImplicitParamDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation IdLoc, const IdentifierInfo *Id, QualType T, ImplicitParamKind ParamKind)
Create implicit parameter.
A (possibly-)qualified type.
DestructionKind isDestructedType() const
Returns a nonzero value if objects of this type require non-trivial work to clean up after.
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
Top level wrappers for InstallAPI frontend operations.
CXXCtorType
C++ constructor types.
GVALinkage
A more specific kind of linkage than enum Linkage.
CXXDtorType
C++ destructor types.
U cast(CodeGen::Address addr)
@ CXXThis
Parameter for C++ 'this' argument.
static bool cxxabiThisAlignment()
Similar to AddedStructorArgs, but only notes the number of additional arguments.
Additional implicit arguments to add to the beginning (Prefix) and end (Suffix) of a constructor / de...
llvm::SmallVector< Arg, 1 > prefix
llvm::SmallVector< Arg, 1 > suffix
The MS C++ ABI needs a pointer to RTTI data plus some flags to describe the type of a catch handler,...