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;
65 llvm::LLVMContext &getVMContext()
const;
66 const llvm::DataLayout &getDataLayout()
const;
89 bool isAndroid()
const;
97 virtual bool isHomogeneousAggregateBaseType(
QualType Ty)
const;
99 virtual bool isHomogeneousAggregateSmallEnough(
const Type *
Base,
100 uint64_t Members)
const;
102 bool isHomogeneousAggregate(
QualType Ty,
const Type *&Base,
103 uint64_t &Members)
const;
108 getNaturalAlignIndirect(
QualType Ty,
bool ByRef =
true,
109 bool Realign =
false,
110 llvm::Type *Padding =
nullptr)
const;
113 getNaturalAlignIndirectInReg(
QualType Ty,
bool Realign =
false)
const;
130 bool asReturnValue)
const = 0;
132 virtual bool isLegalVectorTypeForSwift(
CharUnits totalSize,
134 unsigned elts)
const;
136 virtual bool isSwiftErrorInRegister()
const = 0;
bool supportsSwift() const final override
A (possibly-)qualified type.
Specialize PointerLikeTypeTraits to allow LazyGenerationalUpdatePtr to be placed into a PointerUnion...
C Language Family Type Representation.
The base class of the type hierarchy.
SwiftABIInfo(CodeGen::CodeGenTypes &cgt)
CodeGen::CodeGenTypes & CGT
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
ABIInfo(CodeGen::CodeGenTypes &cgt)
CharUnits - This is an opaque type for sizes expressed in character units.
ABIArgInfo - Helper class to encapsulate information about how a specific C type should be passed to ...
static bool classof(const ABIInfo *info)
Exposes information about the current target.
llvm::CallingConv::ID RuntimeCC
CallingConv
CallingConv - Specifies the calling convention that a function uses.
llvm::CallingConv::ID getRuntimeCC() const
Return the calling convention to use for system runtime functions.
virtual bool supportsSwift() const
CGFunctionInfo - Class to encapsulate the information about a function definition.
Optional< types::ID > Type
Dataflow Directional Tag Classes.
A refining implementation of ABIInfo for targets that support swiftcall.
Implements C++ ABI-specific code generation functions.
This class organizes the cross-module state that is used while lowering AST types to LLVM types...
CodeGenOptions - Track various options which control how the code is optimized and passed to the back...
ABIInfo - Target specific hooks for defining how a type should be passed or returned from functions...