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