Go to the documentation of this file.
9 #ifndef LLVM_CLANG_LIB_CODEGEN_ABIINFO_H
10 #define LLVM_CLANG_LIB_CODEGEN_ABIINFO_H
14 #include "llvm/IR/CallingConv.h"
15 #include "llvm/IR/Type.h"
34 class CodeGenFunction;
39 class SwiftAggLowering;
116 bool Realign =
false,
117 llvm::Type *Padding =
nullptr)
const;
137 bool asReturnValue)
const = 0;
141 unsigned elts)
const;
YAML serialization mapping.
A refining implementation of ABIInfo for targets that support swiftcall.
llvm::CallingConv::ID getRuntimeCC() const
Return the calling convention to use for system runtime functions.
CodeGen::ABIArgInfo getNaturalAlignIndirect(QualType Ty, bool ByVal=true, bool Realign=false, llvm::Type *Padding=nullptr) const
A convenience method to return an indirect ABIArgInfo with an expected alignment equal to the ABI ali...
virtual bool shouldPassIndirectlyForSwift(ArrayRef< llvm::Type * > types, bool asReturnValue) const =0
ABIInfo(CodeGen::CodeGenTypes &cgt)
A (possibly-)qualified type.
Exposes information about the current target.
virtual bool isHomogeneousAggregateBaseType(QualType Ty) const
const CodeGenOptions & getCodeGenOpts() const
ASTContext & getContext() const
virtual bool isZeroLengthBitfieldPermittedInHomogeneousAggregate() const
virtual bool isLegalVectorTypeForSwift(CharUnits totalSize, llvm::Type *eltTy, unsigned elts) const
The base class of the type hierarchy.
ABIArgInfo - Helper class to encapsulate information about how a specific C type should be passed to ...
bool isHomogeneousAggregate(QualType Ty, const Type *&Base, uint64_t &Members) const
isHomogeneousAggregate - Return true if a type is an ELFv2 homogeneous aggregate.
virtual bool supportsSwift() const
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
const llvm::DataLayout & getDataLayout() const
CallingConv
CallingConv - Specifies the calling convention that a function uses.
bool supportsSwift() const final override
CodeGenOptions - Track various options which control how the code is optimized and passed to the back...
llvm::CallingConv::ID RuntimeCC
virtual void computeInfo(CodeGen::CGFunctionInfo &FI) const =0
virtual CodeGen::Address EmitVAArg(CodeGen::CodeGenFunction &CGF, CodeGen::Address VAListAddr, QualType Ty) const =0
EmitVAArg - Emit the target dependent code to load a value of.
SwiftABIInfo(CodeGen::CodeGenTypes &cgt)
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...
llvm::LLVMContext & getVMContext() const
This class organizes the cross-module state that is used while lowering AST types to LLVM types.
const TargetInfo & getTarget() const
virtual bool allowBFloatArgsAndRet() const
CGFunctionInfo - Class to encapsulate the information about a function definition.
CodeGen::ABIArgInfo getNaturalAlignIndirectInReg(QualType Ty, bool Realign=false) const
bool isPromotableIntegerTypeForABI(QualType Ty) const
virtual bool isSwiftErrorInRegister() const =0
CodeGen::CodeGenTypes & CGT
CodeGen::CGCXXABI & getCXXABI() const
static bool classof(const ABIInfo *info)
Implements C++ ABI-specific code generation functions.
virtual CodeGen::Address EmitMSVAArg(CodeGen::CodeGenFunction &CGF, CodeGen::Address VAListAddr, QualType Ty) const
Emit the target dependent code to load a value of.
CharUnits - This is an opaque type for sizes expressed in character units.
ABIInfo - Target specific hooks for defining how a type should be passed or returned from functions.
virtual bool isHomogeneousAggregateSmallEnough(const Type *Base, uint64_t Members) const