26using namespace CodeGen;
29 llvm::AttrBuilder &attrs) {
66 returnType, FnInfoOpts::IsInstanceMethod, argTypes, info, paramInfos,
76 returnType, FnInfoOpts::None, argTypes, info, paramInfos, args);
94 for (
const auto &arg : addedArgs.
Prefix) {
95 implicitArgs.
Prefix.push_back(arg.Value);
97 for (
const auto &arg : addedArgs.
Suffix) {
98 implicitArgs.
Suffix.push_back(arg.Value);
105 assert(FD !=
nullptr &&
"Expected a non-null function declaration!");
108 if (
auto FT = dyn_cast<llvm::FunctionType>(
T))
132 CGF.
CurFn = InsertBlock->getParent();
133 CGF.
Builder.SetInsertPoint(InsertBlock, InsertPoint);
Represents a C++ constructor within a class.
Represents a C++ destructor within a class.
Represents a static or instance method of a struct/union/class.
Represents a C++ struct/union/class.
Represents a canonical, potentially-qualified type.
virtual llvm::Value * getCXXDestructorImplicitParam(CodeGenFunction &CGF, const CXXDestructorDecl *DD, CXXDtorType Type, bool ForVirtualBase, bool Delegating)=0
Get the implicit (second) parameter that comes after the "this" pointer, or nullptr if there is isn't...
virtual AddedStructorArgs getImplicitConstructorArgs(CodeGenFunction &CGF, const CXXConstructorDecl *D, CXXCtorType Type, bool ForVirtualBase, bool Delegating)=0
CGFunctionInfo - Class to encapsulate the information about a function definition.
unsigned getLLVMFieldNo(const FieldDecl *FD) const
Return llvm::StructType element number that corresponds to the field FD.
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...
const Decl * CurCodeDecl
CurCodeDecl - This is the inner-most code context, which includes blocks.
const Decl * CurFuncDecl
CurFuncDecl - Holds the Decl for the current outermost non-closure context.
This class organizes the cross-function state that is used while generating LLVM code.
CodeGenTypes & getTypes()
CGCXXABI & getCXXABI() const
void addDefaultFunctionDefinitionAttributes(llvm::AttrBuilder &attrs)
Like the overload taking a Function &, but intended specifically for frontends that want to build on ...
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...
llvm::Type * ConvertType(QualType T)
ConvertType - Convert type T into a llvm::Type.
const CGFunctionInfo & arrangeLLVMFunctionInfo(CanQualType returnType, FnInfoOpts opts, ArrayRef< CanQualType > argTypes, FunctionType::ExtInfo info, ArrayRef< FunctionProtoType::ExtParameterInfo > paramInfos, RequiredArgs args)
"Arrange" the LLVM information for a call or type with the given signature.
const CGFunctionInfo & arrangeFreeFunctionType(CanQual< FunctionProtoType > Ty)
Arrange the argument and result information for a value of the given freestanding function type.
const CGRecordLayout & getCGRecordLayout(const RecordDecl *)
getCGRecordLayout - Return record layout info for the given record decl.
llvm::Type * ConvertTypeForMem(QualType T)
ConvertTypeForMem - Convert type T into a llvm::Type.
const CGFunctionInfo & arrangeObjCMessageSendSignature(const ObjCMethodDecl *MD, QualType receiverType)
Arrange the argument and result information for the function type through which to perform a send to ...
A class for recording the number of arguments that a function signature requires.
Represents a member of a struct/union/class.
Represents a function declaration or definition.
Represents a prototype with parameter type info, e.g.
A class which abstracts out some details necessary for making a call.
ObjCMethodDecl - Represents an instance or class method declaration.
A (possibly-)qualified type.
Represents a struct/union/class.
The base class of the type hierarchy.
llvm::Value * getCXXDestructorImplicitParam(CodeGenModule &CGM, llvm::BasicBlock *InsertBlock, llvm::BasicBlock::iterator InsertPoint, const CXXDestructorDecl *D, CXXDtorType Type, bool ForVirtualBase, bool Delegating)
const CGFunctionInfo & arrangeFreeFunctionType(CodeGenModule &CGM, CanQual< FunctionProtoType > Ty)
const CGFunctionInfo & arrangeFreeFunctionCall(CodeGenModule &CGM, CanQualType returnType, ArrayRef< CanQualType > argTypes, FunctionType::ExtInfo info, ArrayRef< FunctionProtoType::ExtParameterInfo > paramInfos, RequiredArgs args)
llvm::Type * convertTypeForMemory(CodeGenModule &CGM, QualType T)
const CGFunctionInfo & arrangeObjCMessageSendSignature(CodeGenModule &CGM, const ObjCMethodDecl *MD, QualType receiverType)
unsigned getLLVMFieldNumber(CodeGenModule &CGM, const RecordDecl *RD, const FieldDecl *FD)
Given a non-bitfield struct field, return its index within the elements of the struct's converted typ...
void addDefaultFunctionDefinitionAttributes(CodeGenModule &CGM, llvm::AttrBuilder &attrs)
Given the language and code-generation options that Clang was configured with, set the default LLVM I...
const CGFunctionInfo & arrangeCXXMethodType(CodeGenModule &CGM, const CXXRecordDecl *RD, const FunctionProtoType *FTP, const CXXMethodDecl *MD)
llvm::FunctionType * convertFreeFunctionType(CodeGenModule &CGM, const FunctionDecl *FD)
Returns null if the function type is incomplete and can't be lowered.
const CGFunctionInfo & arrangeCXXMethodCall(CodeGenModule &CGM, CanQualType returnType, ArrayRef< CanQualType > argTypes, FunctionType::ExtInfo info, ArrayRef< FunctionProtoType::ExtParameterInfo > paramInfos, RequiredArgs args)
ImplicitCXXConstructorArgs getImplicitCXXConstructorArgs(CodeGenModule &CGM, const CXXConstructorDecl *D)
Returns the implicit arguments to add to a complete, non-delegating C++ constructor call.
The JSON file list parser is used to communicate input to InstallAPI.
@ Ctor_Complete
Complete object ctor.
CXXDtorType
C++ destructor types.
const FunctionProtoType * T
Additional implicit arguments to add to the beginning (Prefix) and end (Suffix) of a constructor / de...
SmallVector< Arg, 1 > Prefix
SmallVector< Arg, 1 > Suffix
Additional implicit arguments to add to a constructor argument list.
SmallVector< llvm::Value *, 1 > Prefix
Implicit arguments to add before the explicit arguments, but after the *this argument (which always c...
SmallVector< llvm::Value *, 1 > Suffix
Implicit arguments to add after the explicit arguments.