10 #ifndef LLVM_CLANG_LIB_CODEGEN_ABIINFO_H 11 #define LLVM_CLANG_LIB_CODEGEN_ABIINFO_H 15 #include "llvm/IR/CallingConv.h" 16 #include "llvm/IR/Type.h" 35 class CodeGenFunction;
40 class SwiftAggLowering;
66 llvm::LLVMContext &getVMContext()
const;
67 const llvm::DataLayout &getDataLayout()
const;
90 bool isAndroid()
const;
98 virtual bool isHomogeneousAggregateBaseType(
QualType Ty)
const;
100 virtual bool isHomogeneousAggregateSmallEnough(
const Type *
Base,
101 uint64_t Members)
const;
103 bool isHomogeneousAggregate(
QualType Ty,
const Type *&Base,
104 uint64_t &Members)
const;
109 getNaturalAlignIndirect(
QualType Ty,
bool ByRef =
true,
110 bool Realign =
false,
111 llvm::Type *Padding =
nullptr)
const;
114 getNaturalAlignIndirectInReg(
QualType Ty,
bool Realign =
false)
const;
131 bool asReturnValue)
const = 0;
133 virtual bool isLegalVectorTypeForSwift(
CharUnits totalSize,
135 unsigned elts)
const;
137 virtual bool isSwiftErrorInRegister()
const = 0;
bool supportsSwift() const final override
A (possibly-)qualified type.
DominatorTree GraphTraits specialization so the DominatorTree can be iterable by generic graph iterat...
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.
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...