clang 23.0.0git
CIRGenCXXABI.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This provides an abstract class for C++ code generation. Concrete subclasses
10// of this implement code generation for specific C++ ABIs.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CLANG_LIB_CIR_CIRGENCXXABI_H
15#define LLVM_CLANG_LIB_CIR_CIRGENCXXABI_H
16
17#include "CIRGenCall.h"
18#include "CIRGenCleanup.h"
19#include "CIRGenFunction.h"
20#include "CIRGenModule.h"
21
22#include "clang/AST/Mangle.h"
23
24namespace clang::CIRGen {
25
26/// Implements C++ ABI-specific code generation functions.
28protected:
30 std::unique_ptr<clang::MangleContext> mangleContext;
31
32 virtual bool requiresArrayCookie(const CXXNewExpr *e);
33
34public:
35 // TODO(cir): make this protected when target-specific CIRGenCXXABIs are
36 // implemented.
38 : cgm(cgm), mangleContext(cgm.getASTContext().createMangleContext()) {}
39 virtual ~CIRGenCXXABI();
40
41 void setCXXABIThisValue(CIRGenFunction &cgf, mlir::Value thisPtr);
42
43 /// Emit the code to initialize hidden members required to handle virtual
44 /// inheritance, if needed by the ABI.
45 virtual void
48
49 /// Emit a single constructor/destructor with the gen type from a C++
50 /// constructor/destructor Decl.
51 virtual void emitCXXStructor(clang::GlobalDecl gd) = 0;
52
53 virtual mlir::Value
54 getVirtualBaseClassOffset(mlir::Location loc, CIRGenFunction &cgf,
55 Address thisAddr, const CXXRecordDecl *classDecl,
56 const CXXRecordDecl *baseClassDecl) = 0;
57
58 virtual mlir::Value emitDynamicCast(CIRGenFunction &cgf, mlir::Location loc,
59 QualType srcRecordTy,
60 QualType destRecordTy,
61 cir::PointerType destCIRTy,
62 bool isRefCast, Address src) = 0;
63
64 virtual cir::MethodAttr buildVirtualMethodAttr(cir::MethodType methodTy,
65 const CXXMethodDecl *md) = 0;
66
67public:
68 /// Similar to AddedStructorArgs, but only notes the number of additional
69 /// arguments.
71 unsigned prefix = 0;
72 unsigned suffix = 0;
74 AddedStructorArgCounts(unsigned p, unsigned s) : prefix(p), suffix(s) {}
75 static AddedStructorArgCounts withPrefix(unsigned n) { return {n, 0}; }
76 static AddedStructorArgCounts withSuffix(unsigned n) { return {0, n}; }
77 };
78
79 /// Additional implicit arguments to add to the beginning (Prefix) and end
80 /// (Suffix) of a constructor / destructor arg list.
81 ///
82 /// Note that Prefix should actually be inserted *after* the first existing
83 /// arg; `this` arguments always come first.
101
102 /// Build the signature of the given constructor or destructor vairant by
103 /// adding any required parameters. For convenience, ArgTys has been
104 /// initialized with the type of 'this'.
105 virtual AddedStructorArgCounts
108
111 CXXCtorType type, bool forVirtualBase,
112 bool delegating, CallArgList &args);
113
117
118 virtual AddedStructorArgs
120 CXXCtorType type, bool forVirtualBase,
121 bool delegating) = 0;
122
123 /// Emit the ABI-specific prolog for the function
125 CIRGenFunction &cgf) = 0;
126
127 virtual void emitRethrow(CIRGenFunction &cgf, bool isNoReturn) = 0;
128 virtual void emitThrow(CIRGenFunction &cgf, const CXXThrowExpr *e) = 0;
129
130 /// Determine whether it's possible to emit a vtable for \p RD, even
131 /// though we do not know that the vtable has been marked as used by semantic
132 /// analysis.
133 virtual bool canSpeculativelyEmitVTable(const CXXRecordDecl *RD) const = 0;
134
135 virtual void emitBadCastCall(CIRGenFunction &cgf, mlir::Location loc) = 0;
136
138 const CXXCatchStmt *catchStmt,
139 mlir::Value ehToken) = 0;
140
141 virtual mlir::Attribute getAddrOfRTTIDescriptor(mlir::Location loc,
142 QualType ty) = 0;
143
144 /// Get the type of the implicit "this" parameter used by a method. May return
145 /// zero if no specific type is applicable, e.g. if the ABI expects the "this"
146 /// parameter to point to some artificial offset in a complete object due to
147 /// vbases being reordered.
148 virtual const clang::CXXRecordDecl *
150 return md->getParent();
151 }
152
153 /// Return whether the given global decl needs a VTT (virtual table table)
154 /// parameter.
155 virtual bool needsVTTParameter(clang::GlobalDecl gd) { return false; }
156
157 /// Perform ABI-specific "this" argument adjustment required prior to
158 /// a call of a virtual function.
159 /// The "VirtualCall" argument is true iff the call itself is virtual.
162 Address thisPtr,
163 bool virtualCall) {
164 return thisPtr;
165 }
166
167 /// Build a parameter variable suitable for 'this'.
169
170 /// Loads the incoming C++ this pointer as it was passed by the caller.
171 mlir::Value loadIncomingCXXThis(CIRGenFunction &cgf);
172
173 virtual CatchTypeInfo
175 QualType catchHandlerType) = 0;
177 virtual bool shouldTypeidBeNullChecked(QualType srcTy) = 0;
178 virtual mlir::Value emitTypeid(CIRGenFunction &cgf, QualType srcTy,
179 Address thisPtr, mlir::Type typeInfoPtrTy) = 0;
180 virtual void emitBadTypeidCall(CIRGenFunction &cgf, mlir::Location loc) = 0;
181
182 /// Get the implicit (second) parameter that comes after the "this" pointer,
183 /// or nullptr if there is isn't one.
185 const CXXDestructorDecl *dd,
187 bool forVirtualBase,
188 bool delegating) = 0;
189
190 /// Emit constructor variants required by this ABI.
192
193 /// Emit dtor variants required by this ABI.
195
198 bool forVirtualBase, bool delegating,
199 Address thisAddr, QualType thisTy) = 0;
200
201 /// Emit code to force the execution of a destructor during global
202 /// teardown. The default implementation of this uses atexit.
203 ///
204 /// \param dtor - a function taking a single pointer argument
205 /// \param addr - a pointer to pass to the destructor function.
206 virtual void registerGlobalDtor(const VarDecl *vd, cir::FuncOp dtor,
207 mlir::Value addr) = 0;
208
210 const CXXDeleteExpr *de, Address ptr,
211 QualType elementType,
212 const CXXDestructorDecl *dtor) = 0;
213
215 FunctionArgList &args) const = 0;
216
217 /// Checks if ABI requires extra virtual offset for vtable field.
218 virtual bool
220 CIRGenFunction::VPtr vptr) = 0;
221
222 /// Emits the VTable definitions required for the given record type.
224 const CXXRecordDecl *rd) = 0;
225
227 llvm::PointerUnion<const CXXDeleteExpr *, const CXXMemberCallExpr *>;
228
230 const CXXDestructorDecl *dtor,
231 CXXDtorType dtorType,
232 Address thisAddr,
234
235 /// Emit any tables needed to implement virtual inheritance. For Itanium,
236 /// this emits virtual table tables.
237 virtual void emitVirtualInheritanceTables(const CXXRecordDecl *rd) = 0;
238
239 /// Returns true if the thunk should be exported.
240 virtual bool exportThunk() = 0;
241
242 /// Set the linkage and visibility of a thunk function.
243 virtual void setThunkLinkage(cir::FuncOp thunk, bool forVTable, GlobalDecl gd,
244 bool returnAdjustment) = 0;
245
246 /// Perform adjustment on the 'this' pointer for a thunk.
247 /// Returns the adjusted 'this' pointer value.
248 virtual mlir::Value
250 const CXXRecordDecl *unadjustedClass,
251 const ThunkInfo &ti) = 0;
252
253 /// Perform adjustment on a return pointer for a thunk (covariant returns).
254 /// Returns the adjusted return pointer value.
255 virtual mlir::Value
257 const CXXRecordDecl *unadjustedClass,
258 const ReturnAdjustment &ra) = 0;
259
260 /// Adjust call arguments for a destructor thunk.
262 GlobalDecl globalDecl,
263 CallArgList &callArgs) {}
264
265 /// Emit a return from a thunk.
266 virtual void emitReturnFromThunk(CIRGenFunction &cgf, RValue rv,
267 QualType resultType);
268
269 /// Returns true if the given destructor type should be emitted as a linkonce
270 /// delegating thunk, regardless of whether the dtor is defined in this TU or
271 /// not.
273 CXXDtorType dt) const = 0;
274
275 virtual cir::GlobalLinkageKind
277 CXXDtorType dt) const;
278
279 /// Get the address of the vtable for the given record decl which should be
280 /// used for the vptr at the given offset in RD.
281 virtual cir::GlobalOp getAddrOfVTable(const CXXRecordDecl *rd,
282 CharUnits vptrOffset) = 0;
283
284 /// Build a virtual function pointer in the ABI-specific way.
287 Address thisAddr,
288 mlir::Type ty,
289 SourceLocation loc) = 0;
290
291 /// Get the address point of the vtable for the given base subobject.
292 virtual mlir::Value
294 const CXXRecordDecl *vtableClass) = 0;
295
296 /// Get the address point of the vtable for the given base subobject while
297 /// building a constructor or a destructor.
299 CIRGenFunction &cgf, const CXXRecordDecl *vtableClass, BaseSubobject base,
300 const CXXRecordDecl *nearestVBase) = 0;
301
302 virtual llvm::StringRef getPureVirtualCallName() = 0;
303 virtual llvm::StringRef getDeletedVirtualCallName() = 0;
304
305 /// Insert any ABI-specific implicit parameters into the parameter list for a
306 /// function. This generally involves extra data for constructors and
307 /// destructors.
308 ///
309 /// ABIs may also choose to override the return type, which has been
310 /// initialized with the type of 'this' if HasThisReturn(CGF.CurGD) is true or
311 /// the formal return type of the function otherwise.
313 clang::QualType &resTy,
314 FunctionArgList &params) = 0;
315
316 /// Checks if ABI requires to initialize vptrs for given dynamic class.
317 virtual bool
319
320 /// Returns true if the given constructor or destructor is one of the kinds
321 /// that the ABI says returns 'this' (only applies when called non-virtually
322 /// for destructors).
323 ///
324 /// There currently is no way to indicate if a destructor returns 'this' when
325 /// called virtually, and CIR generation does not support this case.
326 virtual bool hasThisReturn(clang::GlobalDecl gd) const { return false; }
327
329 return false;
330 }
331
332 /// Returns true if the target allows calling a function through a pointer
333 /// with a different signature than the actual function (or equivalently,
334 /// bitcasting a function or function pointer to a different function type).
335 /// In principle in the most general case this could depend on the target, the
336 /// calling convention, and the actual types of the arguments and return
337 /// value. Here it just means whether the signature mismatch could *ever* be
338 /// allowed; in other words, does the target do strict checking of signatures
339 /// for all calls.
340 virtual bool canCallMismatchedFunctionType() const { return true; }
341
342 /// Gets the mangle context.
344
348
352
353 void setStructorImplicitParamValue(CIRGenFunction &cgf, mlir::Value val) {
355 }
356
357 /**************************** Array cookies ******************************/
358
359 /// Returns the extra size required in order to store the array
360 /// cookie for the given new-expression. May return 0 to indicate that no
361 /// array cookie is required.
362 ///
363 /// Several cases are filtered out before this method is called:
364 /// - non-array allocations never need a cookie
365 /// - calls to \::operator new(size_t, void*) never need a cookie
366 ///
367 /// \param e - the new-expression being allocated.
368 virtual CharUnits getArrayCookieSize(const CXXNewExpr *e);
369
370 /// Initialize the array cookie for the given allocation.
371 ///
372 /// \param newPtr - a char* which is the presumed-non-null
373 /// return value of the allocation function
374 /// \param numElements - the computed number of elements,
375 /// potentially collapsed from the multidimensional array case;
376 /// always a size_t
377 /// \param elementType - the base element allocated type,
378 /// i.e. the allocated type after stripping all array types
380 mlir::Value numElements,
381 const CXXNewExpr *e,
382 QualType elementType) = 0;
383
384protected:
385 /// Returns the extra size required in order to store the array
386 /// cookie for the given type. Assumes that an array cookie is
387 /// required.
388 virtual CharUnits getArrayCookieSizeImpl(QualType elementType) = 0;
389};
390
391/// Creates and Itanium-family ABI
393
394} // namespace clang::CIRGen
395
396#endif
__device__ __2f16 float __ockl_bool s
Implements C++ ABI-specific code generation functions.
virtual bool requiresArrayCookie(const CXXNewExpr *e)
virtual mlir::Value getVirtualBaseClassOffset(mlir::Location loc, CIRGenFunction &cgf, Address thisAddr, const CXXRecordDecl *classDecl, const CXXRecordDecl *baseClassDecl)=0
virtual bool exportThunk()=0
Returns true if the thunk should be exported.
virtual mlir::Attribute getAddrOfRTTIDescriptor(mlir::Location loc, QualType ty)=0
virtual Address initializeArrayCookie(CIRGenFunction &cgf, Address newPtr, mlir::Value numElements, const CXXNewExpr *e, QualType elementType)=0
Initialize the array cookie for the given allocation.
virtual CharUnits getArrayCookieSizeImpl(QualType elementType)=0
Returns the extra size required in order to store the array cookie for the given type.
virtual mlir::Value emitVirtualDestructorCall(CIRGenFunction &cgf, const CXXDestructorDecl *dtor, CXXDtorType dtorType, Address thisAddr, DeleteOrMemberCallExpr e)=0
virtual void adjustCallArgsForDestructorThunk(CIRGenFunction &cgf, GlobalDecl globalDecl, CallArgList &callArgs)
Adjust call arguments for a destructor thunk.
virtual void registerGlobalDtor(const VarDecl *vd, cir::FuncOp dtor, mlir::Value addr)=0
Emit code to force the execution of a destructor during global teardown.
CIRGenCXXABI(CIRGenModule &cgm)
virtual CatchTypeInfo getAddrOfCXXCatchHandlerType(mlir::Location loc, QualType ty, QualType catchHandlerType)=0
void setStructorImplicitParamValue(CIRGenFunction &cgf, mlir::Value val)
virtual mlir::Value performThisAdjustment(CIRGenFunction &cgf, Address thisAddr, const CXXRecordDecl *unadjustedClass, const ThunkInfo &ti)=0
Perform adjustment on the 'this' pointer for a thunk.
virtual void emitInstanceFunctionProlog(SourceLocation loc, CIRGenFunction &cgf)=0
Emit the ABI-specific prolog for the function.
virtual bool canSpeculativelyEmitVTable(const CXXRecordDecl *RD) const =0
Determine whether it's possible to emit a vtable for RD, even though we do not know that the vtable h...
virtual bool canCallMismatchedFunctionType() const
Returns true if the target allows calling a function through a pointer with a different signature tha...
virtual llvm::StringRef getDeletedVirtualCallName()=0
virtual void emitCXXConstructors(const clang::CXXConstructorDecl *d)=0
Emit constructor variants required by this ABI.
virtual Address adjustThisArgumentForVirtualFunctionCall(CIRGenFunction &cgf, clang::GlobalDecl gd, Address thisPtr, bool virtualCall)
Perform ABI-specific "this" argument adjustment required prior to a call of a virtual function.
virtual cir::MethodAttr buildVirtualMethodAttr(cir::MethodType methodTy, const CXXMethodDecl *md)=0
virtual size_t getSrcArgforCopyCtor(const CXXConstructorDecl *, FunctionArgList &args) const =0
virtual void emitVirtualObjectDelete(CIRGenFunction &cgf, const CXXDeleteExpr *de, Address ptr, QualType elementType, const CXXDestructorDecl *dtor)=0
AddedStructorArgCounts addImplicitConstructorArgs(CIRGenFunction &cgf, const CXXConstructorDecl *d, CXXCtorType type, bool forVirtualBase, bool delegating, CallArgList &args)
virtual void emitVirtualInheritanceTables(const CXXRecordDecl *rd)=0
Emit any tables needed to implement virtual inheritance.
mlir::Value getStructorImplicitParamValue(CIRGenFunction &cgf)
clang::ImplicitParamDecl * getThisDecl(CIRGenFunction &cgf)
virtual const clang::CXXRecordDecl * getThisArgumentTypeForMethod(const clang::CXXMethodDecl *md)
Get the type of the implicit "this" parameter used by a method.
virtual AddedStructorArgs getImplicitConstructorArgs(CIRGenFunction &cgf, const CXXConstructorDecl *d, CXXCtorType type, bool forVirtualBase, bool delegating)=0
virtual void emitCXXDestructors(const clang::CXXDestructorDecl *d)=0
Emit dtor variants required by this ABI.
virtual cir::GlobalOp getAddrOfVTable(const CXXRecordDecl *rd, CharUnits vptrOffset)=0
Get the address of the vtable for the given record decl which should be used for the vptr at the give...
virtual CIRGenCallee getVirtualFunctionPointer(CIRGenFunction &cgf, clang::GlobalDecl gd, Address thisAddr, mlir::Type ty, SourceLocation loc)=0
Build a virtual function pointer in the ABI-specific way.
virtual void emitThrow(CIRGenFunction &cgf, const CXXThrowExpr *e)=0
virtual bool hasThisReturn(clang::GlobalDecl gd) const
Returns true if the given constructor or destructor is one of the kinds that the ABI says returns 'th...
virtual void setThunkLinkage(cir::FuncOp thunk, bool forVTable, GlobalDecl gd, bool returnAdjustment)=0
Set the linkage and visibility of a thunk function.
clang::MangleContext & getMangleContext()
Gets the mangle context.
virtual bool shouldTypeidBeNullChecked(QualType srcTy)=0
virtual mlir::Value getCXXDestructorImplicitParam(CIRGenFunction &cgf, const CXXDestructorDecl *dd, CXXDtorType type, bool forVirtualBase, bool delegating)=0
Get the implicit (second) parameter that comes after the "this" pointer, or nullptr if there is isn't...
virtual void emitVTableDefinitions(CIRGenVTables &cgvt, const CXXRecordDecl *rd)=0
Emits the VTable definitions required for the given record type.
virtual bool useThunkForDtorVariant(const CXXDestructorDecl *dtor, CXXDtorType dt) const =0
Returns true if the given destructor type should be emitted as a linkonce delegating thunk,...
virtual AddedStructorArgCounts buildStructorSignature(GlobalDecl gd, llvm::SmallVectorImpl< CanQualType > &argTys)=0
Build the signature of the given constructor or destructor vairant by adding any required parameters.
virtual void emitBadTypeidCall(CIRGenFunction &cgf, mlir::Location loc)=0
virtual bool needsVTTParameter(clang::GlobalDecl gd)
Return whether the given global decl needs a VTT (virtual table table) parameter.
virtual mlir::Value getVTableAddressPointInStructor(CIRGenFunction &cgf, const CXXRecordDecl *vtableClass, BaseSubobject base, const CXXRecordDecl *nearestVBase)=0
Get the address point of the vtable for the given base subobject while building a constructor or a de...
void setCXXABIThisValue(CIRGenFunction &cgf, mlir::Value thisPtr)
virtual mlir::Value getVTableAddressPoint(BaseSubobject base, const CXXRecordDecl *vtableClass)=0
Get the address point of the vtable for the given base subobject.
std::unique_ptr< clang::MangleContext > mangleContext
virtual void emitDestructorCall(CIRGenFunction &cgf, const CXXDestructorDecl *dd, CXXDtorType type, bool forVirtualBase, bool delegating, Address thisAddr, QualType thisTy)=0
virtual void emitCXXStructor(clang::GlobalDecl gd)=0
Emit a single constructor/destructor with the gen type from a C++ constructor/destructor Decl.
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 mlir::Value emitTypeid(CIRGenFunction &cgf, QualType srcTy, Address thisPtr, mlir::Type typeInfoPtrTy)=0
virtual bool hasMostDerivedReturn(clang::GlobalDecl gd) const
virtual void initializeHiddenVirtualInheritanceMembers(CIRGenFunction &cgf, const CXXRecordDecl *rd)
Emit the code to initialize hidden members required to handle virtual inheritance,...
virtual void emitBadCastCall(CIRGenFunction &cgf, mlir::Location loc)=0
virtual mlir::Value performReturnAdjustment(CIRGenFunction &cgf, Address ret, const CXXRecordDecl *unadjustedClass, const ReturnAdjustment &ra)=0
Perform adjustment on a return pointer for a thunk (covariant returns).
virtual bool isVirtualOffsetNeededForVTableField(CIRGenFunction &cgf, CIRGenFunction::VPtr vptr)=0
Checks if ABI requires extra virtual offset for vtable field.
llvm::PointerUnion< const CXXDeleteExpr *, const CXXMemberCallExpr * > DeleteOrMemberCallExpr
virtual mlir::Value emitDynamicCast(CIRGenFunction &cgf, mlir::Location loc, QualType srcRecordTy, QualType destRecordTy, cir::PointerType destCIRTy, bool isRefCast, Address src)=0
virtual void emitRethrow(CIRGenFunction &cgf, bool isNoReturn)=0
virtual bool doStructorsInitializeVPtrs(const clang::CXXRecordDecl *vtableClass)=0
Checks if ABI requires to initialize vptrs for given dynamic class.
virtual CatchTypeInfo getCatchAllTypeInfo()
virtual void addImplicitStructorParams(CIRGenFunction &cgf, clang::QualType &resTy, FunctionArgList &params)=0
Insert any ABI-specific implicit parameters into the parameter list for a function.
virtual CharUnits getArrayCookieSize(const CXXNewExpr *e)
Returns the extra size required in order to store the array cookie for the given new-expression.
virtual llvm::StringRef getPureVirtualCallName()=0
clang::ImplicitParamDecl *& getStructorImplicitParamDecl(CIRGenFunction &cgf)
virtual void emitBeginCatch(CIRGenFunction &cgf, const CXXCatchStmt *catchStmt, mlir::Value ehToken)=0
virtual cir::GlobalLinkageKind getCXXDestructorLinkage(GVALinkage linkage, const CXXDestructorDecl *dtor, CXXDtorType dt) const
void buildThisParam(CIRGenFunction &cgf, FunctionArgList &params)
Build a parameter variable suitable for 'this'.
ImplicitParamDecl * cxxabiThisDecl
CXXThisDecl - When generating code for a C++ member function, this will hold the implicit 'this' decl...
ImplicitParamDecl * cxxStructorImplicitParamDecl
When generating code for a constructor or destructor, this will hold the implicit argument (e....
This class organizes the cross-function state that is used while generating CIR code.
Type for representing both the decl and type of parameters to a function.
Definition CIRGenCall.h:193
This trivial value class is used to represent the result of an expression that is evaluated.
Definition CIRGenValue.h:33
CXXCatchStmt - This represents a C++ catch block.
Definition StmtCXX.h:28
Represents a C++ constructor within a class.
Definition DeclCXX.h:2611
Represents a delete expression for memory deallocation and destructor calls, e.g.
Definition ExprCXX.h:2627
Represents a C++ destructor within a class.
Definition DeclCXX.h:2876
Represents a static or instance method of a struct/union/class.
Definition DeclCXX.h:2136
const CXXRecordDecl * getParent() const
Return the parent of this method declaration, which is the class in which this method is defined.
Definition DeclCXX.h:2262
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
Definition ExprCXX.h:2356
Represents a C++ struct/union/class.
Definition DeclCXX.h:258
A C++ throw-expression (C++ [except.throw]).
Definition ExprCXX.h:1209
CharUnits - This is an opaque type for sizes expressed in character units.
Definition CharUnits.h:38
GlobalDecl - represents a global declaration.
Definition GlobalDecl.h:57
MangleContext - Context for tracking state which persists across multiple calls to the C++ name mangl...
Definition Mangle.h:52
A (possibly-)qualified type.
Definition TypeBase.h:937
Encodes a location in the source.
Represents a variable declaration or definition.
Definition Decl.h:926
CIRGenCXXABI * CreateCIRGenItaniumCXXABI(CIRGenModule &cgm)
Creates and Itanium-family ABI.
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
CXXCtorType
C++ constructor types.
Definition ABI.h:24
GVALinkage
A more specific kind of linkage than enum Linkage.
Definition Linkage.h:72
CXXDtorType
C++ destructor types.
Definition ABI.h:34
Similar to AddedStructorArgs, but only notes the number of additional arguments.
static AddedStructorArgCounts withSuffix(unsigned n)
static AddedStructorArgCounts withPrefix(unsigned n)
static AddedStructorArgs withPrefix(llvm::SmallVector< Arg, 1 > args)
static AddedStructorArgs withSuffix(llvm::SmallVector< Arg, 1 > args)
AddedStructorArgs(llvm::SmallVector< Arg, 1 > p, llvm::SmallVector< Arg, 1 > s)
The MS C++ ABI needs a pointer to RTTI data plus some flags to describe the type of a catch handler,...
A return adjustment.
Definition Thunk.h:27
The this pointer adjustment as well as an optional return adjustment for a thunk.
Definition Thunk.h:157