13 #ifndef LLVM_CLANG_CODEGEN_SWIFTCALLINGCONV_H 14 #define LLVM_CLANG_CODEGEN_SWIFTCALLINGCONV_H 19 #include "llvm/Support/TrailingObjects.h" 32 class ASTRecordLayout;
54 bool Finished =
false;
60 addEntry(
nullptr, begin, end);
67 void addTypedData(llvm::Type *type,
CharUnits begin);
74 assert(Finished &&
"didn't finish lowering before calling empty()");
75 return Entries.empty();
92 llvm::function_ref<void(CharUnits offset, CharUnits end, llvm::Type *type)>;
108 std::pair<llvm::StructType*, llvm::Type*> getCoerceAndExpandTypes()
const;
115 void splitVectorEntry(
unsigned index);
116 static bool shouldMergeEntries(
const StorageEntry &first,
117 const StorageEntry &second,
140 llvm::VectorType *vectorTy);
142 llvm::Type *eltTy,
unsigned numElts);
145 std::pair<llvm::Type*, unsigned>
147 llvm::VectorType *vectorTy);
154 llvm::VectorType *vectorTy,
A (possibly-)qualified type.
Specialize PointerLikeTypeTraits to allow LazyGenerationalUpdatePtr to be placed into a PointerUnion...
bool isLegalVectorType(CodeGenModule &CGM, CharUnits vectorSize, llvm::Type *eltTy, unsigned numElts)
C Language Family Type Representation.
The base class of the type hierarchy.
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
std::pair< llvm::Type *, unsigned > splitLegalVectorType(CodeGenModule &CGM, CharUnits vectorSize, llvm::VectorType *vectorTy)
Minimally split a legal vector type.
Represents a struct/union/class.
ABIArgInfo classifyArgumentType(CodeGenModule &CGM, CanQualType type)
Classify the rules for how to pass a particular type.
Represents a member of a struct/union/class.
CharUnits - This is an opaque type for sizes expressed in character units.
llvm::function_ref< void(CharUnits offset, CharUnits end, llvm::Type *type)> EnumerationCallback
ABIArgInfo - Helper class to encapsulate information about how a specific C type should be passed to ...
CharUnits getNaturalAlignment(CodeGenModule &CGM, llvm::Type *type)
Return the Swift CC's notion of the natural alignment of a type.
ASTRecordLayout - This class contains layout information for one RecordDecl, which is a struct/union/...
void addOpaqueData(CharUnits begin, CharUnits end)
bool isSwiftErrorLoweredInRegister(CodeGenModule &CGM)
Is swifterror lowered to a register by the target ABI?
static bool classifyReturnType(const CGCXXABI &CXXABI, CGFunctionInfo &FI, const ABIInfo &Info)
bool shouldPassIndirectly(CodeGenModule &CGM, ArrayRef< llvm::Type *> types, bool asReturnValue)
Should an aggregate which expands to the given type sequence be passed/returned indirectly under swif...
bool empty() const
Does this lowering require passing any data?
void computeABIInfo(CodeGenModule &CGM, CGFunctionInfo &FI)
Compute the ABI information of a swiftcall function.
SwiftAggLowering(CodeGenModule &CGM)
void legalizeVectorType(CodeGenModule &CGM, CharUnits vectorSize, llvm::VectorType *vectorTy, llvm::SmallVectorImpl< llvm::Type *> &types)
Turn a vector type in a sequence of legal component vector types.
CGFunctionInfo - Class to encapsulate the information about a function definition.
This class organizes the cross-function state that is used while generating LLVM code.
Optional< types::ID > Type
Dataflow Directional Tag Classes.
bool mustPassRecordIndirectly(CodeGenModule &CGM, const RecordDecl *record)
Is the given record type required to be passed and returned indirectly because of language restrictio...
bool isLegalIntegerType(CodeGenModule &CGM, llvm::IntegerType *type)
Is the given integer type "legal" for Swift's perspective on the current platform?
CharUnits getMaximumVoluntaryIntegerSize(CodeGenModule &CGM)
Return the maximum voluntary integer size for the current target.