clang  16.0.0git
CGCall.h
Go to the documentation of this file.
1 //===----- CGCall.h - Encapsulate calling convention details ----*- C++ -*-===//
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 // These classes wrap the information about a call or function
10 // definition used to handle ABI compliancy.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CLANG_LIB_CODEGEN_CGCALL_H
15 #define LLVM_CLANG_LIB_CODEGEN_CGCALL_H
16 
17 #include "CGValue.h"
18 #include "EHScopeStack.h"
19 #include "clang/AST/ASTFwd.h"
21 #include "clang/AST/GlobalDecl.h"
22 #include "clang/AST/Type.h"
23 #include "llvm/IR/Value.h"
24 
25 namespace llvm {
26 class Type;
27 class Value;
28 } // namespace llvm
29 
30 namespace clang {
31 class Decl;
32 class FunctionDecl;
33 class VarDecl;
34 
35 namespace CodeGen {
36 
37 /// Abstract information about a function or function prototype.
38 class CGCalleeInfo {
39  /// The function prototype of the callee.
40  const FunctionProtoType *CalleeProtoTy;
41  /// The function declaration of the callee.
42  GlobalDecl CalleeDecl;
43 
44 public:
45  explicit CGCalleeInfo() : CalleeProtoTy(nullptr) {}
46  CGCalleeInfo(const FunctionProtoType *calleeProtoTy, GlobalDecl calleeDecl)
47  : CalleeProtoTy(calleeProtoTy), CalleeDecl(calleeDecl) {}
48  CGCalleeInfo(const FunctionProtoType *calleeProtoTy)
49  : CalleeProtoTy(calleeProtoTy) {}
51  : CalleeProtoTy(nullptr), CalleeDecl(calleeDecl) {}
52 
54  return CalleeProtoTy;
55  }
56  const GlobalDecl getCalleeDecl() const { return CalleeDecl; }
57 };
58 
59 /// All available information about a concrete callee.
60 class CGCallee {
61  enum class SpecialKind : uintptr_t {
62  Invalid,
63  Builtin,
64  PseudoDestructor,
65  Virtual,
66 
67  Last = Virtual
68  };
69 
70  struct BuiltinInfoStorage {
71  const FunctionDecl *Decl;
72  unsigned ID;
73  };
74  struct PseudoDestructorInfoStorage {
76  };
77  struct VirtualInfoStorage {
78  const CallExpr *CE;
79  GlobalDecl MD;
80  Address Addr;
81  llvm::FunctionType *FTy;
82  };
83 
84  SpecialKind KindOrFunctionPointer;
85  union {
87  BuiltinInfoStorage BuiltinInfo;
88  PseudoDestructorInfoStorage PseudoDestructorInfo;
89  VirtualInfoStorage VirtualInfo;
90  };
91 
92  explicit CGCallee(SpecialKind kind) : KindOrFunctionPointer(kind) {}
93 
94  CGCallee(const FunctionDecl *builtinDecl, unsigned builtinID)
95  : KindOrFunctionPointer(SpecialKind::Builtin) {
96  BuiltinInfo.Decl = builtinDecl;
97  BuiltinInfo.ID = builtinID;
98  }
99 
100 public:
101  CGCallee() : KindOrFunctionPointer(SpecialKind::Invalid) {}
102 
103  /// Construct a callee. Call this constructor directly when this
104  /// isn't a direct call.
105  CGCallee(const CGCalleeInfo &abstractInfo, llvm::Value *functionPtr)
106  : KindOrFunctionPointer(
107  SpecialKind(reinterpret_cast<uintptr_t>(functionPtr))) {
108  AbstractInfo = abstractInfo;
109  assert(functionPtr && "configuring callee without function pointer");
110  assert(functionPtr->getType()->isPointerTy());
111  assert(functionPtr->getType()->isOpaquePointerTy() ||
112  functionPtr->getType()->getNonOpaquePointerElementType()
113  ->isFunctionTy());
114  }
115 
116  static CGCallee forBuiltin(unsigned builtinID,
117  const FunctionDecl *builtinDecl) {
118  CGCallee result(SpecialKind::Builtin);
119  result.BuiltinInfo.Decl = builtinDecl;
120  result.BuiltinInfo.ID = builtinID;
121  return result;
122  }
123 
125  CGCallee result(SpecialKind::PseudoDestructor);
126  result.PseudoDestructorInfo.Expr = E;
127  return result;
128  }
129 
130  static CGCallee forDirect(llvm::Constant *functionPtr,
131  const CGCalleeInfo &abstractInfo = CGCalleeInfo()) {
132  return CGCallee(abstractInfo, functionPtr);
133  }
134 
135  static CGCallee forDirect(llvm::FunctionCallee functionPtr,
136  const CGCalleeInfo &abstractInfo = CGCalleeInfo()) {
137  return CGCallee(abstractInfo, functionPtr.getCallee());
138  }
139 
140  static CGCallee forVirtual(const CallExpr *CE, GlobalDecl MD, Address Addr,
141  llvm::FunctionType *FTy) {
142  CGCallee result(SpecialKind::Virtual);
143  result.VirtualInfo.CE = CE;
144  result.VirtualInfo.MD = MD;
145  result.VirtualInfo.Addr = Addr;
146  result.VirtualInfo.FTy = FTy;
147  return result;
148  }
149 
150  bool isBuiltin() const {
151  return KindOrFunctionPointer == SpecialKind::Builtin;
152  }
153  const FunctionDecl *getBuiltinDecl() const {
154  assert(isBuiltin());
155  return BuiltinInfo.Decl;
156  }
157  unsigned getBuiltinID() const {
158  assert(isBuiltin());
159  return BuiltinInfo.ID;
160  }
161 
162  bool isPseudoDestructor() const {
163  return KindOrFunctionPointer == SpecialKind::PseudoDestructor;
164  }
166  assert(isPseudoDestructor());
167  return PseudoDestructorInfo.Expr;
168  }
169 
170  bool isOrdinary() const {
171  return uintptr_t(KindOrFunctionPointer) > uintptr_t(SpecialKind::Last);
172  }
174  if (isVirtual())
175  return VirtualInfo.MD;
176  assert(isOrdinary());
177  return AbstractInfo;
178  }
179  llvm::Value *getFunctionPointer() const {
180  assert(isOrdinary());
181  return reinterpret_cast<llvm::Value *>(uintptr_t(KindOrFunctionPointer));
182  }
183  void setFunctionPointer(llvm::Value *functionPtr) {
184  assert(isOrdinary());
185  KindOrFunctionPointer =
186  SpecialKind(reinterpret_cast<uintptr_t>(functionPtr));
187  }
188 
189  bool isVirtual() const {
190  return KindOrFunctionPointer == SpecialKind::Virtual;
191  }
192  const CallExpr *getVirtualCallExpr() const {
193  assert(isVirtual());
194  return VirtualInfo.CE;
195  }
197  assert(isVirtual());
198  return VirtualInfo.MD;
199  }
201  assert(isVirtual());
202  return VirtualInfo.Addr;
203  }
204  llvm::FunctionType *getVirtualFunctionType() const {
205  assert(isVirtual());
206  return VirtualInfo.FTy;
207  }
208 
209  /// If this is a delayed callee computation of some sort, prepare
210  /// a concrete callee.
212 };
213 
214 struct CallArg {
215 private:
216  union {
218  LValue LV; /// The argument is semantically a load from this l-value.
219  };
220  bool HasLV;
221 
222  /// A data-flow flag to make sure getRValue and/or copyInto are not
223  /// called twice for duplicated IR emission.
224  mutable bool IsUsed;
225 
226 public:
229  : RV(rv), HasLV(false), IsUsed(false), Ty(ty) {}
231  : LV(lv), HasLV(true), IsUsed(false), Ty(ty) {}
232  bool hasLValue() const { return HasLV; }
233  QualType getType() const { return Ty; }
234 
235  /// \returns an independent RValue. If the CallArg contains an LValue,
236  /// a temporary copy is returned.
237  RValue getRValue(CodeGenFunction &CGF) const;
238 
240  assert(HasLV && !IsUsed);
241  return LV;
242  }
244  assert(!HasLV && !IsUsed);
245  return RV;
246  }
247  void setRValue(RValue _RV) {
248  assert(!HasLV);
249  RV = _RV;
250  }
251 
252  bool isAggregate() const { return HasLV || RV.isAggregate(); }
253 
254  void copyInto(CodeGenFunction &CGF, Address A) const;
255 };
256 
257 /// CallArgList - Type for representing both the value and type of
258 /// arguments in a call.
259 class CallArgList : public SmallVector<CallArg, 8> {
260 public:
261  CallArgList() : StackBase(nullptr) {}
262 
263  struct Writeback {
264  /// The original argument. Note that the argument l-value
265  /// is potentially null.
267 
268  /// The temporary alloca.
270 
271  /// A value to "use" after the writeback, or null.
272  llvm::Value *ToUse;
273  };
274 
275  struct CallArgCleanup {
277 
278  /// The "is active" insertion point. This instruction is temporary and
279  /// will be removed after insertion.
280  llvm::Instruction *IsActiveIP;
281  };
282 
283  void add(RValue rvalue, QualType type) { push_back(CallArg(rvalue, type)); }
284 
286  push_back(CallArg(LV, type));
287  }
288 
289  /// Add all the arguments from another CallArgList to this one. After doing
290  /// this, the old CallArgList retains its list of arguments, but must not
291  /// be used to emit a call.
292  void addFrom(const CallArgList &other) {
293  insert(end(), other.begin(), other.end());
294  Writebacks.insert(Writebacks.end(), other.Writebacks.begin(),
295  other.Writebacks.end());
296  CleanupsToDeactivate.insert(CleanupsToDeactivate.end(),
297  other.CleanupsToDeactivate.begin(),
298  other.CleanupsToDeactivate.end());
299  assert(!(StackBase && other.StackBase) && "can't merge stackbases");
300  if (!StackBase)
301  StackBase = other.StackBase;
302  }
303 
304  void addWriteback(LValue srcLV, Address temporary, llvm::Value *toUse) {
305  Writeback writeback = {srcLV, temporary, toUse};
306  Writebacks.push_back(writeback);
307  }
308 
309  bool hasWritebacks() const { return !Writebacks.empty(); }
310 
311  typedef llvm::iterator_range<SmallVectorImpl<Writeback>::const_iterator>
313 
315  return writeback_const_range(Writebacks.begin(), Writebacks.end());
316  }
317 
319  llvm::Instruction *IsActiveIP) {
320  CallArgCleanup ArgCleanup;
321  ArgCleanup.Cleanup = Cleanup;
322  ArgCleanup.IsActiveIP = IsActiveIP;
323  CleanupsToDeactivate.push_back(ArgCleanup);
324  }
325 
327  return CleanupsToDeactivate;
328  }
329 
331  llvm::Instruction *getStackBase() const { return StackBase; }
332  void freeArgumentMemory(CodeGenFunction &CGF) const;
333 
334  /// Returns if we're using an inalloca struct to pass arguments in
335  /// memory.
336  bool isUsingInAlloca() const { return StackBase; }
337 
338 private:
339  SmallVector<Writeback, 1> Writebacks;
340 
341  /// Deactivate these cleanups immediately before making the call. This
342  /// is used to cleanup objects that are owned by the callee once the call
343  /// occurs.
344  SmallVector<CallArgCleanup, 1> CleanupsToDeactivate;
345 
346  /// The stacksave call. It dominates all of the argument evaluation.
347  llvm::CallInst *StackBase;
348 };
349 
350 /// FunctionArgList - Type for representing both the decl and type
351 /// of parameters to a function. The decl must be either a
352 /// ParmVarDecl or ImplicitParamDecl.
353 class FunctionArgList : public SmallVector<const VarDecl *, 16> {};
354 
355 /// ReturnValueSlot - Contains the address where the return value of a
356 /// function can be stored, and whether the address is volatile or not.
358  Address Addr = Address::invalid();
359 
360  // Return value slot flags
361  unsigned IsVolatile : 1;
362  unsigned IsUnused : 1;
363  unsigned IsExternallyDestructed : 1;
364 
365 public:
367  : IsVolatile(false), IsUnused(false), IsExternallyDestructed(false) {}
368  ReturnValueSlot(Address Addr, bool IsVolatile, bool IsUnused = false,
369  bool IsExternallyDestructed = false)
370  : Addr(Addr), IsVolatile(IsVolatile), IsUnused(IsUnused),
371  IsExternallyDestructed(IsExternallyDestructed) {}
372 
373  bool isNull() const { return !Addr.isValid(); }
374  bool isVolatile() const { return IsVolatile; }
375  Address getValue() const { return Addr; }
376  bool isUnused() const { return IsUnused; }
377  bool isExternallyDestructed() const { return IsExternallyDestructed; }
378 };
379 
380 } // end namespace CodeGen
381 } // end namespace clang
382 
383 #endif
llvm
YAML serialization mapping.
Definition: Dominators.h:30
clang::CXXPseudoDestructorExpr
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
Definition: ExprCXX.h:2541
clang::CodeGen::RValue
RValue - This trivial value class is used to represent the result of an expression that is evaluated.
Definition: CGValue.h:39
clang::CodeGen::CallArgList::addUncopiedAggregate
void addUncopiedAggregate(LValue LV, QualType type)
Definition: CGCall.h:285
clang::CodeGen::CallArg::LV
LValue LV
Definition: CGCall.h:218
clang::CodeGen::CGCallee::isOrdinary
bool isOrdinary() const
Definition: CGCall.h:170
clang::CodeGen::CGCallee::forDirect
static CGCallee forDirect(llvm::FunctionCallee functionPtr, const CGCalleeInfo &abstractInfo=CGCalleeInfo())
Definition: CGCall.h:135
llvm::SmallVector
Definition: LLVM.h:38
clang::CodeGen::CGCalleeInfo::getCalleeDecl
const GlobalDecl getCalleeDecl() const
Definition: CGCall.h:56
clang::CodeGen::CGCallee::CGCallee
CGCallee(const CGCalleeInfo &abstractInfo, llvm::Value *functionPtr)
Construct a callee.
Definition: CGCall.h:105
clang::CodeGen::CallArg::copyInto
void copyInto(CodeGenFunction &CGF, Address A) const
Definition: CGCall.cpp:4385
clang::QualType
A (possibly-)qualified type.
Definition: Type.h:737
clang::CodeGen::Address::isValid
bool isValid() const
Definition: Address.h:91
clang::CodeGen::CGCallee::getBuiltinDecl
const FunctionDecl * getBuiltinDecl() const
Definition: CGCall.h:153
clang::ast_matchers::type
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
Definition: ASTMatchersInternal.cpp:774
clang::CodeGen::CGCalleeInfo::CGCalleeInfo
CGCalleeInfo()
Definition: CGCall.h:45
clang::CodeGen::CGCallee::prepareConcreteCallee
CGCallee prepareConcreteCallee(CodeGenFunction &CGF) const
If this is a delayed callee computation of some sort, prepare a concrete callee.
Definition: CGCall.cpp:5675
clang::CodeGen::CallArgList::CallArgList
CallArgList()
Definition: CGCall.h:261
clang::CodeGen::CallArgList::CallArgCleanup::IsActiveIP
llvm::Instruction * IsActiveIP
The "is active" insertion point.
Definition: CGCall.h:280
clang::CodeGen::CGCalleeInfo::getCalleeFunctionProtoType
const FunctionProtoType * getCalleeFunctionProtoType() const
Definition: CGCall.h:53
clang::CodeGen::CallArgList::freeArgumentMemory
void freeArgumentMemory(CodeGenFunction &CGF) const
Definition: CGCall.cpp:4102
clang::CodeGen::CGCallee::CGCallee
CGCallee()
Definition: CGCall.h:101
clang::CodeGen::CallArgList::getCleanupsToDeactivate
ArrayRef< CallArgCleanup > getCleanupsToDeactivate() const
Definition: CGCall.h:326
clang::CodeGen::CGCallee::getFunctionPointer
llvm::Value * getFunctionPointer() const
Definition: CGCall.h:179
ASTFwd.h
clang::CodeGen::CallArgList::add
void add(RValue rvalue, QualType type)
Definition: CGCall.h:283
clang::CodeGen::CGCallee::setFunctionPointer
void setFunctionPointer(llvm::Value *functionPtr)
Definition: CGCall.h:183
clang::CodeGen::CGCalleeInfo::CGCalleeInfo
CGCalleeInfo(const FunctionProtoType *calleeProtoTy, GlobalDecl calleeDecl)
Definition: CGCall.h:46
clang::CodeGen::ReturnValueSlot::getValue
Address getValue() const
Definition: CGCall.h:375
clang::CodeGen::CallArg::setRValue
void setRValue(RValue _RV)
Definition: CGCall.h:247
clang::CodeGen::CallArgList::CallArgCleanup::Cleanup
EHScopeStack::stable_iterator Cleanup
Definition: CGCall.h:276
clang::GlobalDecl
GlobalDecl - represents a global declaration.
Definition: GlobalDecl.h:56
clang::CodeGen::CallArgList::Writeback::Temporary
Address Temporary
The temporary alloca.
Definition: CGCall.h:269
clang::CodeGen::AlignmentSource::Decl
@ Decl
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
clang::CodeGen::CallArgList::Writeback::ToUse
llvm::Value * ToUse
A value to "use" after the writeback, or null.
Definition: CGCall.h:272
clang::CodeGen::ReturnValueSlot::isExternallyDestructed
bool isExternallyDestructed() const
Definition: CGCall.h:377
clang::CodeGen::ReturnValueSlot
ReturnValueSlot - Contains the address where the return value of a function can be stored,...
Definition: CGCall.h:357
clang::CodeGen::CallArg::getKnownRValue
RValue getKnownRValue() const
Definition: CGCall.h:243
clang::CodeGen::CallArg::getKnownLValue
LValue getKnownLValue() const
Definition: CGCall.h:239
clang::CodeGen::CGCallee::AbstractInfo
CGCalleeInfo AbstractInfo
Definition: CGCall.h:86
clang::CodeGen::CallArgList::hasWritebacks
bool hasWritebacks() const
Definition: CGCall.h:309
CGValue.h
clang::CodeGen::CGCallee::VirtualInfo
VirtualInfoStorage VirtualInfo
Definition: CGCall.h:89
clang::CodeGen::CallArg::RV
RValue RV
Definition: CGCall.h:217
clang::CodeGen::RValue::isAggregate
bool isAggregate() const
Definition: CGValue.h:56
clang::CodeGen::ReturnValueSlot::ReturnValueSlot
ReturnValueSlot()
Definition: CGCall.h:366
clang::CodeGen::CGCalleeInfo::CGCalleeInfo
CGCalleeInfo(const FunctionProtoType *calleeProtoTy)
Definition: CGCall.h:48
clang::CodeGen::CGCallee::isBuiltin
bool isBuiltin() const
Definition: CGCall.h:150
clang::CodeGen::CallArgList::Writeback
Definition: CGCall.h:263
clang::CodeGen::CGCallee::isVirtual
bool isVirtual() const
Definition: CGCall.h:189
uintptr_t
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...
Definition: opencl-c-base.h:140
Type.h
clang::CodeGen::CGCallee::getPseudoDestructorExpr
const CXXPseudoDestructorExpr * getPseudoDestructorExpr() const
Definition: CGCall.h:165
clang::CodeGen::CGCallee::getVirtualCallExpr
const CallExpr * getVirtualCallExpr() const
Definition: CGCall.h:192
clang::CodeGen::CallArgList::getStackBase
llvm::Instruction * getStackBase() const
Definition: CGCall.h:331
clang::CodeGen::ReturnValueSlot::ReturnValueSlot
ReturnValueSlot(Address Addr, bool IsVolatile, bool IsUnused=false, bool IsExternallyDestructed=false)
Definition: CGCall.h:368
clang::CodeGen::CGCallee::PseudoDestructorInfo
PseudoDestructorInfoStorage PseudoDestructorInfo
Definition: CGCall.h:88
clang::CodeGen::Address
An aligned address.
Definition: Address.h:74
EHScopeStack.h
clang::CodeGen::CGCallee::forDirect
static CGCallee forDirect(llvm::Constant *functionPtr, const CGCalleeInfo &abstractInfo=CGCalleeInfo())
Definition: CGCall.h:130
clang::CodeGen::CallArg::Ty
QualType Ty
Definition: CGCall.h:227
clang::CodeGen::CallArg::CallArg
CallArg(LValue lv, QualType ty)
Definition: CGCall.h:230
clang::CodeGen::CallArgList::writebacks
writeback_const_range writebacks() const
Definition: CGCall.h:314
clang::CodeGen::CGCallee::isPseudoDestructor
bool isPseudoDestructor() const
Definition: CGCall.h:162
clang::CodeGen::CallArgList::isUsingInAlloca
bool isUsingInAlloca() const
Returns if we're using an inalloca struct to pass arguments in memory.
Definition: CGCall.h:336
clang::CodeGen::LValue
LValue - This represents an lvalue references.
Definition: CGValue.h:171
clang::CodeGen::CallArg::getRValue
RValue getRValue(CodeGenFunction &CGF) const
Definition: CGCall.cpp:4375
clang::CodeGen::CallArgList::addArgCleanupDeactivation
void addArgCleanupDeactivation(EHScopeStack::stable_iterator Cleanup, llvm::Instruction *IsActiveIP)
Definition: CGCall.h:318
false
#define false
Definition: stdbool.h:22
clang::CodeGen::CodeGenFunction
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...
Definition: CodeGenFunction.h:231
clang::FunctionProtoType
Represents a prototype with parameter type info, e.g.
Definition: Type.h:4016
clang::CodeGen::CGCallee::getThisAddress
Address getThisAddress() const
Definition: CGCall.h:200
clang::CodeGen::CallArg::getType
QualType getType() const
Definition: CGCall.h:233
llvm::ArrayRef
Definition: LLVM.h:34
clang::CodeGen::CallArg::isAggregate
bool isAggregate() const
Definition: CGCall.h:252
Value
Value
Definition: UninitializedValues.cpp:103
clang::CodeGen::CallArg::hasLValue
bool hasLValue() const
Definition: CGCall.h:232
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:83
clang::CodeGen::Address::invalid
static Address invalid()
Definition: Address.h:90
clang::CodeGen::CGCallee
All available information about a concrete callee.
Definition: CGCall.h:60
clang::CodeGen::CGCallee::getVirtualFunctionType
llvm::FunctionType * getVirtualFunctionType() const
Definition: CGCall.h:204
clang::CodeGen::FunctionArgList
FunctionArgList - Type for representing both the decl and type of parameters to a function.
Definition: CGCall.h:353
clang::CodeGen::CGCallee::forBuiltin
static CGCallee forBuiltin(unsigned builtinID, const FunctionDecl *builtinDecl)
Definition: CGCall.h:116
clang::CodeGen::ReturnValueSlot::isVolatile
bool isVolatile() const
Definition: CGCall.h:374
clang::CodeGen::CGCallee::BuiltinInfo
BuiltinInfoStorage BuiltinInfo
Definition: CGCall.h:87
clang::CodeGen::CGCallee::getVirtualMethodDecl
GlobalDecl getVirtualMethodDecl() const
Definition: CGCall.h:196
clang::CodeGen::CGCalleeInfo
Abstract information about a function or function prototype.
Definition: CGCall.h:38
clang::CodeGen::CGCallee::getBuiltinID
unsigned getBuiltinID() const
Definition: CGCall.h:157
clang::CodeGen::CallArg::CallArg
CallArg(RValue rv, QualType ty)
Definition: CGCall.h:228
clang::MSInheritanceModel::Virtual
@ Virtual
clang::CodeGen::CallArgList::addWriteback
void addWriteback(LValue srcLV, Address temporary, llvm::Value *toUse)
Definition: CGCall.h:304
clang::CodeGen::CallArgList::CallArgCleanup
Definition: CGCall.h:275
clang::Builtin::ID
ID
Definition: Builtins.h:52
clang
Definition: CalledOnceCheck.h:17
clang::ComparisonCategoryType::Last
@ Last
clang::CodeGen::CallArgList::allocateArgumentMemory
void allocateArgumentMemory(CodeGenFunction &CGF)
Definition: CGCall.cpp:4094
clang::CodeGen::CallArgList::addFrom
void addFrom(const CallArgList &other)
Add all the arguments from another CallArgList to this one.
Definition: CGCall.h:292
clang::CodeGen::CGCallee::forVirtual
static CGCallee forVirtual(const CallExpr *CE, GlobalDecl MD, Address Addr, llvm::FunctionType *FTy)
Definition: CGCall.h:140
clang::CodeGen::CGCalleeInfo::CGCalleeInfo
CGCalleeInfo(GlobalDecl calleeDecl)
Definition: CGCall.h:50
clang::CodeGen::CallArgList::writeback_const_range
llvm::iterator_range< SmallVectorImpl< Writeback >::const_iterator > writeback_const_range
Definition: CGCall.h:312
GlobalDecl.h
CanonicalType.h
clang::CodeGen::CGCallee::getAbstractInfo
CGCalleeInfo getAbstractInfo() const
Definition: CGCall.h:173
clang::CodeGen::CallArg
Definition: CGCall.h:214
true
#define true
Definition: stdbool.h:21
clang::Expr
This represents one expression.
Definition: Expr.h:109
clang::CodeGen::ReturnValueSlot::isNull
bool isNull() const
Definition: CGCall.h:373
clang::CodeGen::ReturnValueSlot::isUnused
bool isUnused() const
Definition: CGCall.h:376
clang::CodeGen::CallArgList
CallArgList - Type for representing both the value and type of arguments in a call.
Definition: CGCall.h:259
clang::CodeGen::CallArgList::Writeback::Source
LValue Source
The original argument.
Definition: CGCall.h:266
clang::FunctionDecl
Represents a function declaration or definition.
Definition: Decl.h:1904
clang::CallExpr
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2811
clang::diag::kind
unsigned kind
All of the diagnostics that can be emitted by the frontend.
Definition: DiagnosticIDs.h:62
clang::CodeGen::EHScopeStack::stable_iterator
A saved depth on the scope stack.
Definition: EHScopeStack.h:101
clang::CodeGen::CGCallee::forPseudoDestructor
static CGCallee forPseudoDestructor(const CXXPseudoDestructorExpr *E)
Definition: CGCall.h:124
Type
MatchType Type
Definition: ASTMatchFinder.cpp:71