clang  3.9.0
CGCXXABI.cpp
Go to the documentation of this file.
1 //===----- CGCXXABI.cpp - Interface to C++ ABIs ---------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This provides an abstract class for C++ code generation. Concrete subclasses
11 // of this implement code generation for specific C++ ABIs.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #include "CGCXXABI.h"
16 #include "CGCleanup.h"
17 
18 using namespace clang;
19 using namespace CodeGen;
20 
22 
24  DiagnosticsEngine &Diags = CGF.CGM.getDiags();
25  unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error,
26  "cannot yet compile %0 in this ABI");
27  Diags.Report(CGF.getContext().getFullLoc(CGF.CurCodeDecl->getLocation()),
28  DiagID)
29  << S;
30 }
31 
33  // If RD has a non-trivial move or copy constructor, we cannot copy the
34  // argument.
36  return false;
37 
38  // If RD has a non-trivial destructor, we cannot copy the argument.
39  if (RD->hasNonTrivialDestructor())
40  return false;
41 
42  // We can only copy the argument if there exists at least one trivial,
43  // non-deleted copy or move constructor.
44  // FIXME: This assumes that all lazily declared copy and move constructors are
45  // not deleted. This assumption might not be true in some corner cases.
46  bool CopyDeleted = false;
47  bool MoveDeleted = false;
48  for (const CXXConstructorDecl *CD : RD->ctors()) {
49  if (CD->isCopyConstructor() || CD->isMoveConstructor()) {
50  assert(CD->isTrivial());
51  // We had at least one undeleted trivial copy or move ctor. Return
52  // directly.
53  if (!CD->isDeleted())
54  return true;
55  if (CD->isCopyConstructor())
56  CopyDeleted = true;
57  else
58  MoveDeleted = true;
59  }
60  }
61 
62  // If all trivial copy and move constructors are deleted, we cannot copy the
63  // argument.
64  return !(CopyDeleted && MoveDeleted);
65 }
66 
68  return llvm::Constant::getNullValue(CGM.getTypes().ConvertType(T));
69 }
70 
71 llvm::Type *
74 }
75 
77  CodeGenFunction &CGF, const Expr *E, Address This,
78  llvm::Value *&ThisPtrForCall,
79  llvm::Value *MemPtr, const MemberPointerType *MPT) {
80  ErrorUnsupportedABI(CGF, "calls through member pointers");
81 
82  ThisPtrForCall = This.getPointer();
83  const FunctionProtoType *FPT =
85  const CXXRecordDecl *RD =
86  cast<CXXRecordDecl>(MPT->getClass()->getAs<RecordType>()->getDecl());
87  llvm::FunctionType *FTy = CGM.getTypes().GetFunctionType(
88  CGM.getTypes().arrangeCXXMethodType(RD, FPT, /*FD=*/nullptr));
89  return llvm::Constant::getNullValue(FTy->getPointerTo());
90 }
91 
94  Address Base, llvm::Value *MemPtr,
95  const MemberPointerType *MPT) {
96  ErrorUnsupportedABI(CGF, "loads of member pointers");
97  llvm::Type *Ty = CGF.ConvertType(MPT->getPointeeType())
98  ->getPointerTo(Base.getAddressSpace());
99  return llvm::Constant::getNullValue(Ty);
100 }
101 
103  const CastExpr *E,
104  llvm::Value *Src) {
105  ErrorUnsupportedABI(CGF, "member function pointer conversions");
106  return GetBogusMemberPointer(E->getType());
107 }
108 
110  llvm::Constant *Src) {
111  return GetBogusMemberPointer(E->getType());
112 }
113 
114 llvm::Value *
116  llvm::Value *L,
117  llvm::Value *R,
118  const MemberPointerType *MPT,
119  bool Inequality) {
120  ErrorUnsupportedABI(CGF, "member function pointer comparison");
121  return CGF.Builder.getFalse();
122 }
123 
124 llvm::Value *
126  llvm::Value *MemPtr,
127  const MemberPointerType *MPT) {
128  ErrorUnsupportedABI(CGF, "member function pointer null testing");
129  return CGF.Builder.getFalse();
130 }
131 
132 llvm::Constant *
134  return GetBogusMemberPointer(QualType(MPT, 0));
135 }
136 
139  MD->getType(), MD->getParent()->getTypeForDecl()));
140 }
141 
143  CharUnits offset) {
144  return GetBogusMemberPointer(QualType(MPT, 0));
145 }
146 
147 llvm::Constant *CGCXXABI::EmitMemberPointer(const APValue &MP, QualType MPT) {
148  return GetBogusMemberPointer(MPT);
149 }
150 
152  // Fake answer.
153  return true;
154 }
155 
157  const CXXMethodDecl *MD = cast<CXXMethodDecl>(CGF.CurGD.getDecl());
158 
159  // FIXME: I'm not entirely sure I like using a fake decl just for code
160  // generation. Maybe we can come up with a better way?
161  ImplicitParamDecl *ThisDecl
162  = ImplicitParamDecl::Create(CGM.getContext(), nullptr, MD->getLocation(),
163  &CGM.getContext().Idents.get("this"),
164  MD->getThisType(CGM.getContext()));
165  params.push_back(ThisDecl);
166  CGF.CXXABIThisDecl = ThisDecl;
167 
168  // Compute the presumed alignment of 'this', which basically comes
169  // down to whether we know it's a complete object or not.
170  auto &Layout = CGF.getContext().getASTRecordLayout(MD->getParent());
171  if (MD->getParent()->getNumVBases() == 0 || // avoid vcall in common case
172  MD->getParent()->hasAttr<FinalAttr>() ||
173  !isThisCompleteObject(CGF.CurGD)) {
174  CGF.CXXABIThisAlignment = Layout.getAlignment();
175  } else {
176  CGF.CXXABIThisAlignment = Layout.getNonVirtualAlignment();
177  }
178 }
179 
181  /// Initialize the 'this' slot.
182  assert(getThisDecl(CGF) && "no 'this' variable for function");
183  CGF.CXXABIThisValue
185  "this");
186 }
187 
189  RValue RV, QualType ResultType) {
190  CGF.EmitReturnOfRValue(RV, ResultType);
191 }
192 
194  if (!requiresArrayCookie(expr))
195  return CharUnits::Zero();
197 }
198 
200  // BOGUS
201  return CharUnits::Zero();
202 }
203 
205  Address NewPtr,
206  llvm::Value *NumElements,
207  const CXXNewExpr *expr,
208  QualType ElementType) {
209  // Should never be called.
210  ErrorUnsupportedABI(CGF, "array cookie initialization");
211  return Address::invalid();
212 }
213 
215  QualType elementType) {
216  // If the class's usual deallocation function takes two arguments,
217  // it needs a cookie.
218  if (expr->doesUsualArrayDeleteWantSize())
219  return true;
220 
221  return elementType.isDestructedType();
222 }
223 
225  // If the class's usual deallocation function takes two arguments,
226  // it needs a cookie.
227  if (expr->doesUsualArrayDeleteWantSize())
228  return true;
229 
230  return expr->getAllocatedType().isDestructedType();
231 }
232 
234  const CXXDeleteExpr *expr, QualType eltTy,
235  llvm::Value *&numElements,
236  llvm::Value *&allocPtr, CharUnits &cookieSize) {
237  // Derive a char* in the same address space as the pointer.
238  ptr = CGF.Builder.CreateElementBitCast(ptr, CGF.Int8Ty);
239 
240  // If we don't need an array cookie, bail out early.
241  if (!requiresArrayCookie(expr, eltTy)) {
242  allocPtr = ptr.getPointer();
243  numElements = nullptr;
244  cookieSize = CharUnits::Zero();
245  return;
246  }
247 
248  cookieSize = getArrayCookieSizeImpl(eltTy);
249  Address allocAddr =
250  CGF.Builder.CreateConstInBoundsByteGEP(ptr, -cookieSize);
251  allocPtr = allocAddr.getPointer();
252  numElements = readArrayCookieImpl(CGF, allocAddr, cookieSize);
253 }
254 
256  Address ptr,
257  CharUnits cookieSize) {
258  ErrorUnsupportedABI(CGF, "reading a new[] cookie");
259  return llvm::ConstantInt::get(CGF.SizeTy, 0);
260 }
261 
262 /// Returns the adjustment, in bytes, required for the given
263 /// member-pointer operation. Returns null if no adjustment is
264 /// required.
266  assert(E->getCastKind() == CK_DerivedToBaseMemberPointer ||
267  E->getCastKind() == CK_BaseToDerivedMemberPointer);
268 
269  QualType derivedType;
270  if (E->getCastKind() == CK_DerivedToBaseMemberPointer)
271  derivedType = E->getSubExpr()->getType();
272  else
273  derivedType = E->getType();
274 
275  const CXXRecordDecl *derivedClass =
276  derivedType->castAs<MemberPointerType>()->getClass()->getAsCXXRecordDecl();
277 
278  return CGM.GetNonVirtualBaseClassOffset(derivedClass,
279  E->path_begin(),
280  E->path_end());
281 }
282 
284  // TODO: Store base specifiers in APValue member pointer paths so we can
285  // easily reuse CGM.GetNonVirtualBaseClassOffset().
286  const ValueDecl *MPD = MP.getMemberPointerDecl();
289  bool DerivedMember = MP.isMemberPointerToDerivedMember();
290  const CXXRecordDecl *RD = cast<CXXRecordDecl>(MPD->getDeclContext());
291  for (unsigned I = 0, N = Path.size(); I != N; ++I) {
292  const CXXRecordDecl *Base = RD;
293  const CXXRecordDecl *Derived = Path[I];
294  if (DerivedMember)
295  std::swap(Base, Derived);
296  ThisAdjustment +=
298  RD = Path[I];
299  }
300  if (DerivedMember)
301  ThisAdjustment = -ThisAdjustment;
302  return ThisAdjustment;
303 }
304 
305 llvm::BasicBlock *
307  const CXXRecordDecl *RD) {
309  llvm_unreachable("shouldn't be called in this ABI");
310 
311  ErrorUnsupportedABI(CGF, "complete object detection in ctor");
312  return nullptr;
313 }
314 
316  return false;
317 }
318 
319 llvm::CallInst *
321  llvm::Value *Exn) {
322  // Just call std::terminate and ignore the violating exception.
323  return CGF.EmitNounwindRuntimeCall(CGF.CGM.getTerminateFn());
324 }
325 
327  return CatchTypeInfo{nullptr, 0};
328 }
329 
330 std::vector<CharUnits> CGCXXABI::getVBPtrOffsets(const CXXRecordDecl *RD) {
331  return std::vector<CharUnits>();
332 }
CastKind getCastKind() const
Definition: Expr.h:2680
virtual llvm::Constant * EmitMemberPointer(const APValue &MP, QualType MPT)
Create a member pointer for the given member pointer constant.
Definition: CGCXXABI.cpp:147
const internal::VariadicDynCastAllOfMatcher< Stmt, Expr > expr
Matches expressions.
Definition: ASTMatchers.h:1367
A (possibly-)qualified type.
Definition: Type.h:598
DestructionKind isDestructedType() const
Returns a nonzero value if objects of this type require non-trivial work to clean up after...
Definition: Type.h:1032
virtual void EmitReturnFromThunk(CodeGenFunction &CGF, RValue RV, QualType ResultType)
Definition: CGCXXABI.cpp:188
ctor_range ctors() const
Definition: DeclCXX.h:779
const CGFunctionInfo & arrangeCXXMethodType(const CXXRecordDecl *RD, const FunctionProtoType *FTP, const CXXMethodDecl *MD)
Arrange the argument and result information for a call to an unknown C++ non-static member function o...
Definition: CGCall.cpp:212
const Decl * CurCodeDecl
CurCodeDecl - This is the inner-most code context, which includes blocks.
bool hasNonTrivialDestructor() const
Determine whether this class has a non-trivial destructor (C++ [class.dtor]p3)
Definition: DeclCXX.h:1275
FullSourceLoc getFullLoc(SourceLocation Loc) const
Definition: ASTContext.h:612
QualType getPointeeType() const
Definition: Type.h:2420
DiagnosticBuilder Report(SourceLocation Loc, unsigned DiagID)
Issue the message to the client.
Definition: Diagnostic.h:1124
llvm::IntegerType * Int8Ty
i8, i16, i32, and i64
Represents a C++ constructor within a class.
Definition: DeclCXX.h:2187
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
Definition: ExprCXX.h:2049
virtual llvm::BasicBlock * EmitCtorCompleteObjectHandler(CodeGenFunction &CGF, const CXXRecordDecl *RD)
Definition: CGCXXABI.cpp:306
Address GetAddrOfLocalVar(const VarDecl *VD)
GetAddrOfLocalVar - Return the address of a local variable.
A this pointer adjustment.
Definition: ABI.h:108
QualType getThisType(ASTContext &C) const
Returns the type of the this pointer.
Definition: DeclCXX.cpp:1672
Address CreateConstInBoundsByteGEP(Address Addr, CharUnits Offset, const llvm::Twine &Name="")
Given a pointer to i8, adjust it by a given constant offset.
Definition: CGBuilder.h:245
void EmitThisParam(CodeGenFunction &CGF)
Perform prolog initialization of the parameter variable suitable for 'this' emitted by buildThisParam...
Definition: CGCXXABI.cpp:180
virtual bool requiresArrayCookie(const CXXDeleteExpr *E, QualType eltType)
Definition: CGCXXABI.cpp:214
ArrayRef< const CXXRecordDecl * > getMemberPointerPath() const
Definition: APValue.cpp:622
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...
llvm::Type * ConvertType(QualType T)
ConvertType - Convert type T into a llvm::Type.
bool hasNonTrivialCopyConstructor() const
Determine whether this class has a non-trivial copy constructor (C++ [class.copy]p6, C++11 [class.copy]p12)
Definition: DeclCXX.h:1219
virtual bool isThisCompleteObject(GlobalDecl GD) const =0
Determine whether there's something special about the rules of the ABI tell us that 'this' is a compl...
static CharUnits Zero()
Zero - Construct a CharUnits quantity of zero.
Definition: CharUnits.h:53
Expr * getSubExpr()
Definition: Expr.h:2684
const Decl * getDecl() const
Definition: GlobalDecl.h:62
IdentifierTable & Idents
Definition: ASTContext.h:459
virtual llvm::Value * EmitMemberDataPointerAddress(CodeGenFunction &CGF, const Expr *E, Address Base, llvm::Value *MemPtr, const MemberPointerType *MPT)
Calculate an l-value from an object and a data member pointer.
Definition: CGCXXABI.cpp:93
Address CreateElementBitCast(Address Addr, llvm::Type *Ty, const llvm::Twine &Name="")
Cast the element type of the given address to a different type, preserving information like the align...
Definition: CGBuilder.h:168
CharUnits - This is an opaque type for sizes expressed in character units.
Definition: CharUnits.h:38
const ValueDecl * getMemberPointerDecl() const
Definition: APValue.cpp:608
const CXXRecordDecl * getParent() const
Returns the parent of this method declaration, which is the class in which this method is defined...
Definition: DeclCXX.h:1838
path_iterator path_begin()
Definition: Expr.h:2700
Concrete class used by the front-end to report problems and issues.
Definition: Diagnostic.h:135
virtual llvm::Value * EmitMemberPointerIsNotNull(CodeGenFunction &CGF, llvm::Value *MemPtr, const MemberPointerType *MPT)
Determine if a member pointer is non-null. Returns an i1.
Definition: CGCXXABI.cpp:125
CodeGenModule & CGM
Definition: CGCXXABI.h:45
llvm::Constant * getTerminateFn()
Get the declaration of std::terminate for the platform.
Definition: CGException.cpp:50
ImplicitParamDecl * getThisDecl(CodeGenFunction &CGF)
Definition: CGCXXABI.h:52
const ASTRecordLayout & getASTRecordLayout(const RecordDecl *D) const
Get or compute information about the layout of the specified record (struct/union/class) D...
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Definition: Expr.h:2632
GlobalDecl CurGD
CurGD - The GlobalDecl for the current function being compiled.
detail::InMemoryDirectory::const_iterator I
QualType getType() const
Definition: Decl.h:599
virtual llvm::Type * ConvertMemberPointerType(const MemberPointerType *MPT)
Find the LLVM type used to represent the given member pointer type.
Definition: CGCXXABI.cpp:72
virtual bool isZeroInitializable(const MemberPointerType *MPT)
Return true if the given member pointer can be zero-initialized (in the C++ sense) with an LLVM zeroi...
Definition: CGCXXABI.cpp:151
Represents a prototype with parameter type info, e.g.
Definition: Type.h:3073
llvm::CallInst * EmitNounwindRuntimeCall(llvm::Value *callee, const Twine &name="")
virtual CharUnits GetArrayCookieSize(const CXXNewExpr *expr)
Returns the extra size required in order to store the array cookie for the given new-expression.
Definition: CGCXXABI.cpp:193
const TargetInfo & getTarget() const
RValue - This trivial value class is used to represent the result of an expression that is evaluated...
Definition: CGValue.h:38
bool hasConstructorVariants() const
Does this ABI have different entrypoints for complete-object and base-subobject constructors?
Definition: TargetCXXABI.h:223
llvm::Value * getPointer() const
Definition: Address.h:38
const Type * getTypeForDecl() const
Definition: Decl.h:2590
ValueDecl - Represent the declaration of a variable (in which case it is an lvalue) a function (in wh...
Definition: Decl.h:590
Expr - This represents one expression.
Definition: Expr.h:105
static Address invalid()
Definition: Address.h:35
virtual CharUnits getArrayCookieSizeImpl(QualType elementType)
Returns the extra size required in order to store the array cookie for the given type.
Definition: CGCXXABI.cpp:199
virtual void ReadArrayCookie(CodeGenFunction &CGF, Address Ptr, const CXXDeleteExpr *expr, QualType ElementType, llvm::Value *&NumElements, llvm::Value *&AllocPtr, CharUnits &CookieSize)
Reads the array cookie associated with the given pointer, if it has one.
Definition: CGCXXABI.cpp:233
bool isMemberPointerToDerivedMember() const
Definition: APValue.cpp:615
CharUnits getBaseClassOffset(const CXXRecordDecl *Base) const
getBaseClassOffset - Get the offset, in chars, for the given base class.
Definition: RecordLayout.h:219
ASTContext & getContext() const
QualType getAllocatedType() const
Definition: ExprCXX.h:1863
virtual llvm::Constant * EmitMemberFunctionPointer(const CXXMethodDecl *MD)
Create a member pointer for the given method.
Definition: CGCXXABI.cpp:137
void ErrorUnsupportedABI(CodeGenFunction &CGF, StringRef S)
Issue a diagnostic about unsupported features in the ABI.
Definition: CGCXXABI.cpp:23
GlobalDecl - represents a global declaration.
Definition: GlobalDecl.h:29
The l-value was considered opaque, so the alignment was determined from a type.
virtual llvm::Value * EmitMemberPointerConversion(CodeGenFunction &CGF, const CastExpr *E, llvm::Value *Src)
Perform a derived-to-base, base-to-derived, or bitcast member pointer conversion. ...
Definition: CGCXXABI.cpp:102
virtual bool NeedsVTTParameter(GlobalDecl GD)
Return whether the given global decl needs a VTT parameter.
Definition: CGCXXABI.cpp:315
ASTContext & getContext() const
IdentifierInfo & get(StringRef Name)
Return the identifier token info for the specified named identifier.
bool canCopyArgument(const CXXRecordDecl *RD) const
Returns true if C++ allows us to copy the memory of an object of type RD when it is passed as an argu...
Definition: CGCXXABI.cpp:32
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
Definition: ExprCXX.h:1804
Represents a static or instance method of a struct/union/class.
Definition: DeclCXX.h:1736
virtual CatchTypeInfo getCatchAllTypeInfo()
Definition: CGCXXABI.cpp:326
An aligned address.
Definition: Address.h:25
unsigned getCustomDiagID(Level L, const char(&FormatString)[N])
Return an ID for a diagnostic with the specified format string and level.
Definition: Diagnostic.h:609
unsigned getAddressSpace() const
Return the address space that this address resides in.
Definition: Address.h:57
virtual llvm::Constant * EmitNullMemberPointer(const MemberPointerType *MPT)
Create a null member pointer of the given type.
Definition: CGCXXABI.cpp:133
The MS C++ ABI needs a pointer to RTTI data plus some flags to describe the type of a catch handler...
Definition: CGCleanup.h:38
virtual Address InitializeArrayCookie(CodeGenFunction &CGF, Address NewPtr, llvm::Value *NumElements, const CXXNewExpr *expr, QualType ElementType)
Initialize the array cookie for the given allocation.
Definition: CGCXXABI.cpp:204
llvm::Constant * getMemberPointerAdjustment(const CastExpr *E)
A utility method for computing the offset required for the given base-to-derived or derived-to-base m...
Definition: CGCXXABI.cpp:265
FunctionArgList - Type for representing both the decl and type of parameters to a function...
Definition: CGCall.h:146
virtual llvm::Value * EmitMemberPointerComparison(CodeGenFunction &CGF, llvm::Value *L, llvm::Value *R, const MemberPointerType *MPT, bool Inequality)
Emit a comparison between two member pointers. Returns an i1.
Definition: CGCXXABI.cpp:115
QualType getType() const
Definition: Expr.h:126
QualType getMemberPointerType(QualType T, const Type *Cls) const
Return the uniqued reference to the type for a member pointer to the specified type in the specified ...
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
Definition: ExprCXX.h:2008
virtual llvm::Value * readArrayCookieImpl(CodeGenFunction &IGF, Address ptr, CharUnits cookieSize)
Reads the array cookie for an allocation which is known to have one.
Definition: CGCXXABI.cpp:255
llvm::LoadInst * CreateLoad(Address Addr, const llvm::Twine &Name="")
Definition: CGBuilder.h:70
void buildThisParam(CodeGenFunction &CGF, FunctionArgList &Params)
Build a parameter variable suitable for 'this'.
Definition: CGCXXABI.cpp:156
detail::InMemoryDirectory::const_iterator E
A pointer to member type per C++ 8.3.3 - Pointers to members.
Definition: Type.h:2401
path_iterator path_end()
Definition: Expr.h:2701
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
Definition: Type.h:3707
QualType getPointerDiffType() const
Return the unique type for "ptrdiff_t" (C99 7.17) defined in <stddef.h>.
const T * getAs() const
Member-template getAs<specific type>'.
Definition: Type.h:5818
static ImplicitParamDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation IdLoc, IdentifierInfo *Id, QualType T)
Definition: Decl.cpp:4016
ASTContext & getContext() const
Definition: CGCXXABI.h:79
virtual llvm::Constant * EmitMemberDataPointer(const MemberPointerType *MPT, CharUnits offset)
Create a member pointer for the given field.
Definition: CGCXXABI.cpp:142
llvm::Constant * GetNonVirtualBaseClassOffset(const CXXRecordDecl *ClassDecl, CastExpr::path_const_iterator PathBegin, CastExpr::path_const_iterator PathEnd)
Returns the offset from a derived class to a class.
Definition: CGClass.cpp:175
CXXRecordDecl * getAsCXXRecordDecl() const
Retrieves the CXXRecordDecl that this type refers to, either because the type is a RecordType or beca...
Definition: Type.cpp:1528
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat]...
Definition: APValue.h:38
const Type * getClass() const
Definition: Type.h:2434
bool hasNonTrivialMoveConstructor() const
Determine whether this class has a non-trivial move constructor (C++11 [class.copy]p12) ...
Definition: DeclCXX.h:1233
DiagnosticsEngine & getDiags() const
Represents a C++ struct/union/class.
Definition: DeclCXX.h:263
TargetCXXABI getCXXABI() const
Get the C++ ABI currently in use.
llvm::Type * ConvertType(QualType T)
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
Definition: ExprCXX.h:1947
virtual llvm::Value * EmitLoadOfMemberFunctionPointer(CodeGenFunction &CGF, const Expr *E, Address This, llvm::Value *&ThisPtrForCall, llvm::Value *MemPtr, const MemberPointerType *MPT)
Load a member function from an object and a member function pointer.
Definition: CGCXXABI.cpp:76
virtual llvm::CallInst * emitTerminateForUnexpectedException(CodeGenFunction &CGF, llvm::Value *Exn)
Definition: CGCXXABI.cpp:320
virtual std::vector< CharUnits > getVBPtrOffsets(const CXXRecordDecl *RD)
Gets the offsets of all the virtual base pointers in a given class.
Definition: CGCXXABI.cpp:330
unsigned getNumVBases() const
Retrieves the number of virtual base classes of this class.
Definition: DeclCXX.h:733
llvm::Constant * GetBogusMemberPointer(QualType T)
Get a null value for unsupported member pointers.
Definition: CGCXXABI.cpp:67
CharUnits getMemberPointerPathAdjustment(const APValue &MP)
Computes the non-virtual adjustment needed for a member pointer conversion along an inheritance path ...
Definition: CGCXXABI.cpp:283
llvm::FunctionType * GetFunctionType(const CGFunctionInfo &Info)
GetFunctionType - Get the LLVM function type for.
Definition: CGCall.cpp:1466