15 #ifndef LLVM_CLANG_LIB_CODEGEN_CGCALL_H
16 #define LLVM_CLANG_LIB_CODEGEN_CGCALL_H
22 #include "llvm/ADT/FoldingSet.h"
23 #include "llvm/IR/Value.h"
82 push_back(
CallArg(rvalue, type, needscopy));
86 insert(
end(), other.begin(), other.end());
87 Writebacks.insert(Writebacks.end(),
88 other.Writebacks.begin(), other.Writebacks.end());
93 Writeback writeback = { srcLV, temporary, toUse };
94 Writebacks.push_back(writeback);
99 typedef llvm::iterator_range<SmallVectorImpl<Writeback>::const_iterator>
107 llvm::Instruction *IsActiveIP) {
111 CleanupsToDeactivate.push_back(ArgCleanup);
115 return CleanupsToDeactivate;
135 llvm::CallInst *StackBase;
152 llvm::PointerIntPair<llvm::Value *, 2, unsigned int>
Value;
164 :
Value(Addr.isValid() ? Addr.getPointer() : nullptr,
165 (IsVolatile ? IS_VOLATILE : 0) | (IsUnused ? IS_UNUSED : 0)),
166 Alignment(Addr.isValid() ? Addr.getAlignment() :
CharUnits::Zero()) {}
ReturnValueSlot - Contains the address where the return value of a function can be stored...
A (possibly-)qualified type.
C Language Family Type Representation.
void freeArgumentMemory(CodeGenFunction &CGF) const
SmallVector< llvm::AttributeSet, 8 > AttributeListType
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...
EHScopeStack::stable_iterator Cleanup
void addArgCleanupDeactivation(EHScopeStack::stable_iterator Cleanup, llvm::Instruction *IsActiveIP)
CharUnits - This is an opaque type for sizes expressed in character units.
CallArg(RValue rv, QualType ty, bool needscopy)
llvm::iterator_range< SmallVectorImpl< Writeback >::const_iterator > writeback_const_range
void addFrom(const CallArgList &other)
writeback_const_range writebacks() const
RValue - This trivial value class is used to represent the result of an expression that is evaluated...
ArrayRef< CallArgCleanup > getCleanupsToDeactivate() const
void addWriteback(LValue srcLV, Address temporary, llvm::Value *toUse)
Address Temporary
The temporary alloca.
llvm::Value * ToUse
A value to "use" after the writeback, or null.
void add(RValue rvalue, QualType type, bool needscopy=false)
bool hasWritebacks() const
The l-value was considered opaque, so the alignment was determined from a type.
A saved depth on the scope stack.
void allocateArgumentMemory(CodeGenFunction &CGF)
FunctionArgList - Type for representing both the decl and type of parameters to a function...
llvm::Instruction * IsActiveIP
The "is active" insertion point.
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
LValue Source
The original argument.
ReturnValueSlot(Address Addr, bool IsVolatile, bool IsUnused=false)
bool isUsingInAlloca() const
Returns if we're using an inalloca struct to pass arguments in memory.
llvm::Instruction * getStackBase() const
LValue - This represents an lvalue references.
CallArgList - Type for representing both the value and type of arguments in a call.