clang 10.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/CanonicalType.h"
20 #include "clang/AST/GlobalDecl.h"
21 #include "clang/AST/Type.h"
22 #include "llvm/IR/Value.h"
23
24 // FIXME: Restructure so we don't have to expose so much stuff.
25 #include "ABIInfo.h"
26
27 namespace llvm {
28 class AttributeList;
29 class Function;
30 class Type;
31 class Value;
32 } // namespace llvm
33
34 namespace clang {
35 class ASTContext;
36 class Decl;
37 class FunctionDecl;
38 class ObjCMethodDecl;
39 class VarDecl;
40
41 namespace CodeGen {
42
43 /// Abstract information about a function or function prototype.
44 class CGCalleeInfo {
45 /// The function prototype of the callee.
46 const FunctionProtoType *CalleeProtoTy;
47 /// The function declaration of the callee.
48 GlobalDecl CalleeDecl;
49
50 public:
51 explicit CGCalleeInfo() : CalleeProtoTy(nullptr), CalleeDecl() {}
52 CGCalleeInfo(const FunctionProtoType *calleeProtoTy, GlobalDecl calleeDecl)
53 : CalleeProtoTy(calleeProtoTy), CalleeDecl(calleeDecl) {}
54 CGCalleeInfo(const FunctionProtoType *calleeProtoTy)
55 : CalleeProtoTy(calleeProtoTy), CalleeDecl() {}
56 CGCalleeInfo(GlobalDecl calleeDecl)
57 : CalleeProtoTy(nullptr), CalleeDecl(calleeDecl) {}
58
59 const FunctionProtoType *getCalleeFunctionProtoType() const {
60 return CalleeProtoTy;
61 }
62 const GlobalDecl getCalleeDecl() const { return CalleeDecl; }
63 };
64
65 /// All available information about a concrete callee.
66 class CGCallee {
67 enum class SpecialKind : uintptr_t {
68 Invalid,
69 Builtin,
70 PseudoDestructor,
71 Virtual,
72
73 Last = Virtual
74 };
75
76 struct BuiltinInfoStorage {
77 const FunctionDecl *Decl;
78 unsigned ID;
79 };
80 struct PseudoDestructorInfoStorage {
81 const CXXPseudoDestructorExpr *Expr;
82 };
83 struct VirtualInfoStorage {
84 const CallExpr *CE;
85 GlobalDecl MD;
86 Address Addr;
87 llvm::FunctionType *FTy;
88 };
89
90 SpecialKind KindOrFunctionPointer;
91 union {
92 CGCalleeInfo AbstractInfo;
93 BuiltinInfoStorage BuiltinInfo;
94 PseudoDestructorInfoStorage PseudoDestructorInfo;
95 VirtualInfoStorage VirtualInfo;
96 };
97
98 explicit CGCallee(SpecialKind kind) : KindOrFunctionPointer(kind) {}
99
100 CGCallee(const FunctionDecl *builtinDecl, unsigned builtinID)
101 : KindOrFunctionPointer(SpecialKind::Builtin) {
102 BuiltinInfo.Decl = builtinDecl;
103 BuiltinInfo.ID = builtinID;
104 }
105
106 public:
107 CGCallee() : KindOrFunctionPointer(SpecialKind::Invalid) {}
108
109 /// Construct a callee. Call this constructor directly when this
110 /// isn't a direct call.
111 CGCallee(const CGCalleeInfo &abstractInfo, llvm::Value *functionPtr)
112 : KindOrFunctionPointer(SpecialKind(uintptr_t(functionPtr))) {
113 AbstractInfo = abstractInfo;
114 assert(functionPtr && "configuring callee without function pointer");
115 assert(functionPtr->getType()->isPointerTy());
116 assert(functionPtr->getType()->getPointerElementType()->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
127 static CGCallee forPseudoDestructor(const CXXPseudoDestructorExpr *E) {
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 }
168 const CXXPseudoDestructorExpr *getPseudoDestructorExpr() const {
169 assert(isPseudoDestructor());
170 return PseudoDestructorInfo.Expr;
171 }
172
173 bool isOrdinary() const {
174 return uintptr_t(KindOrFunctionPointer) > uintptr_t(SpecialKind::Last);
175 }
176 CGCalleeInfo getAbstractInfo() const {
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 = SpecialKind(uintptr_t(functionPtr));
189 }
190
191 bool isVirtual() const {
192 return KindOrFunctionPointer == SpecialKind::Virtual;
193 }
194 const CallExpr *getVirtualCallExpr() const {
195 assert(isVirtual());
196 return VirtualInfo.CE;
197 }
198 GlobalDecl getVirtualMethodDecl() const {
199 assert(isVirtual());
200 return VirtualInfo.MD;
201 }
202 Address getThisAddress() const {
203 assert(isVirtual());
204 return VirtualInfo.Addr;
205 }
206 llvm::FunctionType *getVirtualFunctionType() const {
207 assert(isVirtual());
208 return VirtualInfo.FTy;
209 }
210
211 /// If this is a delayed callee computation of some sort, prepare
212 /// a concrete callee.
213 CGCallee prepareConcreteCallee(CodeGenFunction &CGF) const;
214 };
215
216 struct CallArg {
217 private:
218 union {
219 RValue RV;
220 LValue LV; /// The argument is semantically a load from this l-value.
221 };
222 bool HasLV;
223
224 /// A data-flow flag to make sure getRValue and/or copyInto are not
225 /// called twice for duplicated IR emission.
226 mutable bool IsUsed;
227
228 public:
229 QualType Ty;
230 CallArg(RValue rv, QualType ty)
231 : RV(rv), HasLV(false), IsUsed(false), Ty(ty) {}
232 CallArg(LValue lv, QualType ty)
233 : LV(lv), HasLV(true), IsUsed(false), Ty(ty) {}
234 bool hasLValue() const { return HasLV; }
235 QualType getType() const { return Ty; }
236
237 /// \returns an independent RValue. If the CallArg contains an LValue,
238 /// a temporary copy is returned.
239 RValue getRValue(CodeGenFunction &CGF) const;
240
241 LValue getKnownLValue() const {
242 assert(HasLV && !IsUsed);
243 return LV;
244 }
245 RValue getKnownRValue() const {
246 assert(!HasLV && !IsUsed);
247 return RV;
248 }
249 void setRValue(RValue _RV) {
250 assert(!HasLV);
251 RV = _RV;
252 }
253
254 bool isAggregate() const { return HasLV || RV.isAggregate(); }
255
256 void copyInto(CodeGenFunction &CGF, Address A) const;
257 };
258
259 /// CallArgList - Type for representing both the value and type of
260 /// arguments in a call.
261 class CallArgList : public SmallVector<CallArg, 8> {
262 public:
263 CallArgList() : StackBase(nullptr) {}
264
265 struct Writeback {
266 /// The original argument. Note that the argument l-value
267 /// is potentially null.
268 LValue Source;
269
270 /// The temporary alloca.
271 Address Temporary;
272
273 /// A value to "use" after the writeback, or null.
274 llvm::Value *ToUse;
275 };
276
277 struct CallArgCleanup {
278 EHScopeStack::stable_iterator Cleanup;
279
280 /// The "is active" insertion point. This instruction is temporary and
281 /// will be removed after insertion.
282 llvm::Instruction *IsActiveIP;
283 };
284
285 void add(RValue rvalue, QualType type) { push_back(CallArg(rvalue, type)); }
286
287 void addUncopiedAggregate(LValue LV, QualType type) {
288 push_back(CallArg(LV, type));
289 }
290
291 /// Add all the arguments from another CallArgList to this one. After doing
292 /// this, the old CallArgList retains its list of arguments, but must not
293 /// be used to emit a call.
294 void addFrom(const CallArgList &other) {
295 insert(end(), other.begin(), other.end());
296 Writebacks.insert(Writebacks.end(), other.Writebacks.begin(),
297 other.Writebacks.end());
298 CleanupsToDeactivate.insert(CleanupsToDeactivate.end(),
299 other.CleanupsToDeactivate.begin(),
300 other.CleanupsToDeactivate.end());
301 assert(!(StackBase && other.StackBase) && "can't merge stackbases");
302 if (!StackBase)
303 StackBase = other.StackBase;
304 }
305
306 void addWriteback(LValue srcLV, Address temporary, llvm::Value *toUse) {
307 Writeback writeback = {srcLV, temporary, toUse};
308 Writebacks.push_back(writeback);
309 }
310
311 bool hasWritebacks() const { return !Writebacks.empty(); }
312
313 typedef llvm::iterator_range<SmallVectorImpl<Writeback>::const_iterator>
314 writeback_const_range;
315
316 writeback_const_range writebacks() const {
317 return writeback_const_range(Writebacks.begin(), Writebacks.end());
318 }
319
320 void addArgCleanupDeactivation(EHScopeStack::stable_iterator Cleanup,
321 llvm::Instruction *IsActiveIP) {
322 CallArgCleanup ArgCleanup;
323 ArgCleanup.Cleanup = Cleanup;
324 ArgCleanup.IsActiveIP = IsActiveIP;
325 CleanupsToDeactivate.push_back(ArgCleanup);
326 }
327
328 ArrayRef<CallArgCleanup> getCleanupsToDeactivate() const {
329 return CleanupsToDeactivate;
330 }
331
332 void allocateArgumentMemory(CodeGenFunction &CGF);
333 llvm::Instruction *getStackBase() const { return StackBase; }
334 void freeArgumentMemory(CodeGenFunction &CGF) const;
335
336 /// Returns if we're using an inalloca struct to pass arguments in
337 /// memory.
338 bool isUsingInAlloca() const { return StackBase; }
339
340 private:
341 SmallVector<Writeback, 1> Writebacks;
342
343 /// Deactivate these cleanups immediately before making the call. This
344 /// is used to cleanup objects that are owned by the callee once the call
345 /// occurs.
346 SmallVector<CallArgCleanup, 1> CleanupsToDeactivate;
347
348 /// The stacksave call. It dominates all of the argument evaluation.
349 llvm::CallInst *StackBase;
350 };
351
352 /// FunctionArgList - Type for representing both the decl and type
353 /// of parameters to a function. The decl must be either a
354 /// ParmVarDecl or ImplicitParamDecl.
355 class FunctionArgList : public SmallVector<const VarDecl *, 16> {};
356
357 /// ReturnValueSlot - Contains the address where the return value of a
358 /// function can be stored, and whether the address is volatile or not.
359 class ReturnValueSlot {
360 llvm::PointerIntPair<llvm::Value *, 2, unsigned int> Value;
361 CharUnits Alignment;
362
363 // Return value slot flags
364 enum Flags {
365 IS_VOLATILE = 0x1,
366 IS_UNUSED = 0x2,
367 };
368
369 public:
370 ReturnValueSlot() {}
371 ReturnValueSlot(Address Addr, bool IsVolatile, bool IsUnused = false)
372 : Value(Addr.isValid() ? Addr.getPointer() : nullptr,
373 (IsVolatile ? IS_VOLATILE : 0) | (IsUnused ? IS_UNUSED : 0)),
374 Alignment(Addr.isValid() ? Addr.getAlignment() : CharUnits::Zero()) {}
375
376 bool isNull() const { return !getValue().isValid(); }
377
378 bool isVolatile() const { return Value.getInt() & IS_VOLATILE; }
379 Address getValue() const { return Address(Value.getPointer(), Alignment); }
380 bool isUnused() const { return Value.getInt() & IS_UNUSED; }
381 };
382
383 } // end namespace CodeGen
384 } // end namespace clang
385
386 #endif
clang::CodeGen::ReturnValueSlot
ReturnValueSlot - Contains the address where the return value of a function can be stored...
Definition: CGCall.h:359
clang::CodeGen::CGCallee::CGCallee
CGCallee()
Definition: CGCall.h:107
clang::CodeGen::CallArg::isAggregate
bool isAggregate() const
Definition: CGCall.h:254
clang::Builtin::ID
ID
Definition: Builtins.h:46
clang::FunctionDecl
Represents a function declaration or definition.
Definition: Decl.h:1783
clang::CodeGen::CallArg::Ty
QualType Ty
Definition: CGCall.h:229
clang::CodeGen::CGCallee::forDirect
static CGCallee forDirect(llvm::FunctionCallee functionPtr, const CGCalleeInfo &abstractInfo=CGCalleeInfo())
Definition: CGCall.h:138
clang::QualType
A (possibly-)qualified type.
Definition: Type.h:654
clang::CodeGen::CGCallee::CGCallee
CGCallee(const CGCalleeInfo &abstractInfo, llvm::Value *functionPtr)
Construct a callee.
Definition: CGCall.h:111
llvm
Specialize PointerLikeTypeTraits to allow LazyGenerationalUpdatePtr to be placed into a PointerUnion...
Definition: Dominators.h:30
clang::CodeGen::ReturnValueSlot::isUnused
bool isUnused() const
Definition: CGCall.h:380
Type.h
C Language Family Type Representation.
BuiltinInfo
static const Builtin::Info BuiltinInfo[]
Definition: Builtins.cpp:20
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:88
clang::CodeGen::CallArgList::addUncopiedAggregate
void addUncopiedAggregate(LValue LV, QualType type)
Definition: CGCall.h:287
clang::CodeGen::CallArg::CallArg
CallArg(LValue lv, QualType ty)
Definition: CGCall.h:232
clang::CodeGen::AlignmentSource::Decl
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
clang::XRayInstrKind::Function
constexpr XRayInstrMask Function
Definition: XRayInstr.h:38
EHScopeStack.h
clang::CodeGen::CallArgList::hasWritebacks
bool hasWritebacks() const
Definition: CGCall.h:311
Value
Value
Definition: UninitializedValues.cpp:101
clang::MSInheritanceModel::Virtual
clang::CodeGen::CallArgList::getStackBase
llvm::Instruction * getStackBase() const
Definition: CGCall.h:333
clang::CodeGen::CGCallee::getFunctionPointer
llvm::Value * getFunctionPointer() const
Definition: CGCall.h:182
CanonicalType.h
clang::CodeGen::ReturnValueSlot::getValue
Address getValue() const
Definition: CGCall.h:379
clang::CodeGen::CallArgList::add
void add(RValue rvalue, QualType type)
Definition: CGCall.h:285
clang::CodeGen::CodeGenFunction
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...
Definition: CodeGenFunction.h:227
clang::CodeGen::CGCallee::VirtualInfo
VirtualInfoStorage VirtualInfo
Definition: CGCall.h:95
ABIInfo.h
clang::CodeGen::CallArgList::CallArgCleanup::Cleanup
EHScopeStack::stable_iterator Cleanup
Definition: CGCall.h:278
CGValue.h
clang::CodeGen::CallArgList::isUsingInAlloca
bool isUsingInAlloca() const
Returns if we&#39;re using an inalloca struct to pass arguments in memory.
Definition: CGCall.h:338
clang::interp::Zero
bool Zero(InterpState &S, CodePtr OpPC)
Definition: Interp.h:812
clang::CodeGen::CGCallee::isOrdinary
bool isOrdinary() const
Definition: CGCall.h:173
clang::CodeGen::CGCallee::isVirtual
bool isVirtual() const
Definition: CGCall.h:191
clang::CodeGen::CallArgList::addArgCleanupDeactivation
void addArgCleanupDeactivation(EHScopeStack::stable_iterator Cleanup, llvm::Instruction *IsActiveIP)
Definition: CGCall.h:320
clang::CodeGen::CGCallee::getPseudoDestructorExpr
const CXXPseudoDestructorExpr * getPseudoDestructorExpr() const
Definition: CGCall.h:168
clang::CharUnits
CharUnits - This is an opaque type for sizes expressed in character units.
Definition: CharUnits.h:38
clang::CodeGen::CGCallee::getBuiltinDecl
const FunctionDecl * getBuiltinDecl() const
Definition: CGCall.h:156
GlobalDecl.h
clang::CodeGen::CGCallee::setFunctionPointer
void setFunctionPointer(llvm::Value *functionPtr)
Definition: CGCall.h:186
clang::CodeGen::ReturnValueSlot::ReturnValueSlot
ReturnValueSlot()
Definition: CGCall.h:370
clang::CodeGen::CallArgList::writeback_const_range
llvm::iterator_range< SmallVectorImpl< Writeback >::const_iterator > writeback_const_range
Definition: CGCall.h:314
llvm::ArrayRef
Definition: LLVM.h:31
clang::CodeGen::CallArg::getType
QualType getType() const
Definition: CGCall.h:235
clang::CodeGen::CGCallee::getVirtualCallExpr
const CallExpr * getVirtualCallExpr() const
Definition: CGCall.h:194
clang::CXXPseudoDestructorExpr
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
Definition: ExprCXX.h:2479
clang::CodeGen::CallArgList::addFrom
void addFrom(const CallArgList &other)
Add all the arguments from another CallArgList to this one.
Definition: CGCall.h:294
clang::FunctionProtoType
Represents a prototype with parameter type info, e.g.
Definition: Type.h:3754
clang::CodeGen::CallArgList::CallArgList
CallArgList()
Definition: CGCall.h:263
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::CGCallee::isPseudoDestructor
bool isPseudoDestructor() const
Definition: CGCall.h:165
clang::CodeGen::CallArgList::writebacks
writeback_const_range writebacks() const
Definition: CGCall.h:316
clang::CodeGen::CallArgList::addWriteback
void addWriteback(LValue srcLV, Address temporary, llvm::Value *toUse)
Definition: CGCall.h:306
clang::CodeGen::CGCallee::PseudoDestructorInfo
PseudoDestructorInfoStorage PseudoDestructorInfo
Definition: CGCall.h:94
clang::CodeGen::CallArgList::Writeback::Temporary
Address Temporary
The temporary alloca.
Definition: CGCall.h:271
clang::CodeGen::CallArgList::Writeback::ToUse
llvm::Value * ToUse
A value to "use" after the writeback, or null.
Definition: CGCall.h:274
clang::CodeGen::CallArg::LV
LValue LV
Definition: CGCall.h:220
clang::Expr
This represents one expression.
Definition: Expr.h:108
clang::CodeGen::CGCalleeInfo::CGCalleeInfo
CGCalleeInfo(const FunctionProtoType *calleeProtoTy)
Definition: CGCall.h:54
clang::CodeGen::CGCallee::forDirect
static CGCallee forDirect(llvm::Constant *functionPtr, const CGCalleeInfo &abstractInfo=CGCalleeInfo())
Definition: CGCall.h:133
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:62
clang::CodeGen::CGCallee::getThisAddress
Address getThisAddress() const
Definition: CGCall.h:202
getValue
static SVal getValue(SVal val, SValBuilder &svalBuilder)
Definition: ArrayBoundCheckerV2.cpp:277
clang::CodeGen::CGCallee::BuiltinInfo
BuiltinInfoStorage BuiltinInfo
Definition: CGCall.h:93
clang::CodeGen::CGCallee::AbstractInfo
CGCalleeInfo AbstractInfo
Definition: CGCall.h:92
clang::ComparisonCategoryType::Last
clang::CodeGen::ReturnValueSlot::isVolatile
bool isVolatile() const
Definition: CGCall.h:378
clang::GlobalDecl
GlobalDecl - represents a global declaration.
Definition: GlobalDecl.h:40
clang::CodeGen::CallArgList::Writeback
Definition: CGCall.h:265
clang::CodeGen::CallArg::getKnownLValue
LValue getKnownLValue() const
Definition: CGCall.h:241
clang::CodeGen::CGCallee::isBuiltin
bool isBuiltin() const
Definition: CGCall.h:153
false
#define false
Definition: stdbool.h:17
clang::CodeGen::EHScopeStack::stable_iterator
A saved depth on the scope stack.
Definition: EHScopeStack.h:106
clang::CodeGen::CGCallee::getVirtualFunctionType
llvm::FunctionType * getVirtualFunctionType() const
Definition: CGCall.h:206
clang::CodeGen::CallArg::setRValue
void setRValue(RValue _RV)
Definition: CGCall.h:249
clang::CodeGen::CGCallee::getVirtualMethodDecl
GlobalDecl getVirtualMethodDecl() const
Definition: CGCall.h:198
clang::CodeGen::CallArg::RV
RValue RV
Definition: CGCall.h:219
llvm::SmallVector
Definition: LLVM.h:35
clang::CodeGen::Address
An aligned address.
Definition: Address.h:24
clang::CodeGen::CGCallee
All available information about a concrete callee.
Definition: CGCall.h:66
clang::CodeGen::FunctionArgList
FunctionArgList - Type for representing both the decl and type of parameters to a function...
Definition: CGCall.h:355
clang::CodeGen::CGCalleeInfo::CGCalleeInfo
CGCalleeInfo()
Definition: CGCall.h:51
Type
Optional< types::ID > Type
Definition: InterpolatingCompilationDatabase.cpp:127
clang::CodeGen::CallArgList::CallArgCleanup::IsActiveIP
llvm::Instruction * IsActiveIP
The "is active" insertion point.
Definition: CGCall.h:282
clang
Dataflow Directional Tag Classes.
Definition: CFGReachabilityAnalysis.h:21
clang::CodeGen::ReturnValueSlot::isNull
bool isNull() const
Definition: CGCall.h:376
clang::CodeGen::CGCalleeInfo::CGCalleeInfo
CGCalleeInfo(const FunctionProtoType *calleeProtoTy, GlobalDecl calleeDecl)
Definition: CGCall.h:52
clang::CodeGen::CallArgList::Writeback::Source
LValue Source
The original argument.
Definition: CGCall.h:268
clang::CodeGen::CGCallee::forBuiltin
static CGCallee forBuiltin(unsigned builtinID, const FunctionDecl *builtinDecl)
Definition: CGCall.h:119
type
clang::CodeGen::CGCallee::getBuiltinID
unsigned getBuiltinID() const
Definition: CGCall.h:160
clang::CodeGen::CallArgList::CallArgCleanup
Definition: CGCall.h:277
clang::CodeGen::CGCallee::forPseudoDestructor
static CGCallee forPseudoDestructor(const CXXPseudoDestructorExpr *E)
Definition: CGCall.h:127
clang::CodeGen::ReturnValueSlot::ReturnValueSlot
ReturnValueSlot(Address Addr, bool IsVolatile, bool IsUnused=false)
Definition: CGCall.h:371
clang::CodeGen::CallArg::getKnownRValue
RValue getKnownRValue() const
Definition: CGCall.h:245
clang::CodeGen::CGCalleeInfo::getCalleeDecl
const GlobalDecl getCalleeDecl() const
Definition: CGCall.h:62
clang::diag::kind
unsigned kind
All of the diagnostics that can be emitted by the frontend.
Definition: DiagnosticIDs.h:60
clang::CodeGen::CallArg::CallArg
CallArg(RValue rv, QualType ty)
Definition: CGCall.h:230
clang::CodeGen::CGCallee::forVirtual
static CGCallee forVirtual(const CallExpr *CE, GlobalDecl MD, Address Addr, llvm::FunctionType *FTy)
Definition: CGCall.h:143
clang::CodeGen::CallArg
Definition: CGCall.h:216
clang::CallExpr
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2546
clang::CodeGen::CallArg::hasLValue
bool hasLValue() const
Definition: CGCall.h:234
clang::CodeGen::CGCalleeInfo::getCalleeFunctionProtoType
const FunctionProtoType * getCalleeFunctionProtoType() const
Definition: CGCall.h:59
true
#define true
Definition: stdbool.h:16
clang::CodeGen::LValue
LValue - This represents an lvalue references.
Definition: CGValue.h:167
clang::CodeGen::CGCallee::getAbstractInfo
CGCalleeInfo getAbstractInfo() const
Definition: CGCall.h:176
clang::CodeGen::CallArgList
CallArgList - Type for representing both the value and type of arguments in a call.
Definition: CGCall.h:261
clang::CodeGen::CGCalleeInfo::CGCalleeInfo
CGCalleeInfo(GlobalDecl calleeDecl)
Definition: CGCall.h:56
clang::CodeGen::CGCalleeInfo
Abstract information about a function or function prototype.
Definition: CGCall.h:44
clang::CodeGen::CallArgList::getCleanupsToDeactivate
ArrayRef< CallArgCleanup > getCleanupsToDeactivate() const
Definition: CGCall.h:328