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;
69 llvm::LLVMContext &getVMContext()
const;
70 const llvm::DataLayout &getDataLayout()
const;
98 bool isAndroid()
const;
106 virtual bool isHomogeneousAggregateBaseType(
QualType Ty)
const;
108 virtual bool isHomogeneousAggregateSmallEnough(
const Type *
Base,
109 uint64_t Members)
const;
111 virtual bool shouldSignExtUnsignedType(
QualType Ty)
const;
113 bool isHomogeneousAggregate(
QualType Ty,
const Type *&Base,
114 uint64_t &Members)
const;
119 getNaturalAlignIndirect(
QualType Ty,
bool ByRef =
true,
120 bool Realign =
false,
121 llvm::Type *Padding =
nullptr)
const;
124 getNaturalAlignIndirectInReg(
QualType Ty,
bool Realign =
false)
const;
140 virtual bool shouldPassIndirectlyForSwift(
CharUnits totalSize,
142 bool asReturnValue)
const = 0;
144 virtual bool isLegalVectorTypeForSwift(
CharUnits totalSize,
146 unsigned elts)
const;
148 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 getBuiltinCC() const
Return the calling convention to use for compiler builtins.
llvm::CallingConv::ID RuntimeCC
CallingConv
CallingConv - Specifies the calling convention that a function uses.
The l-value was considered opaque, so the alignment was determined from a type.
llvm::CallingConv::ID getRuntimeCC() const
Return the calling convention to use for system runtime functions.
virtual bool supportsSwift() const
llvm::CallingConv::ID BuiltinCC
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...