14 #ifndef LLVM_CLANG_CODEGEN_SWIFTCALLINGCONV_H
15 #define LLVM_CLANG_CODEGEN_SWIFTCALLINGCONV_H
20 #include "llvm/ADT/FoldingSet.h"
21 #include "llvm/Support/TrailingObjects.h"
34 class ASTRecordLayout;
56 bool Finished =
false;
62 addEntry(
nullptr, begin, end);
76 assert(Finished &&
"didn't finish lowering before calling empty()");
77 return Entries.empty();
94 llvm::function_ref<void(CharUnits offset, llvm::Type *type)>;
117 void splitVectorEntry(
unsigned index);
133 llvm::VectorType *vectorTy);
138 std::pair<llvm::Type*, unsigned>
140 llvm::VectorType *vectorTy);
147 llvm::VectorType *vectorTy,
A (possibly-)qualified type.
bool empty() const
Does this lowering require passing any data?
C Language Family Type Representation.
bool shouldPassIndirectly(bool asReturnValue) const
According to the target Swift ABI, should a value with this lowering be passed indirectly?
The base class of the type hierarchy.
void enumerateComponents(EnumerationCallback callback) const
Enumerate the expanded components of this type.
std::pair< llvm::Type *, unsigned > splitLegalVectorType(CodeGenModule &CGM, CharUnits vectorSize, llvm::VectorType *vectorTy)
Minimally split a legal vector type.
RecordDecl - Represents a struct/union/class.
ABIArgInfo classifyArgumentType(CodeGenModule &CGM, CanQualType type)
Classify the rules for how to pass a particular type.
FieldDecl - An instance of this class is created by Sema::ActOnField to represent a member of a struc...
ABIArgInfo classifyReturnType(CodeGenModule &CGM, CanQualType type)
Classify the rules for how to return a particular type.
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 ...
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)
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.
The l-value was considered opaque, so the alignment was determined from a type.
void addTypedData(QualType type, CharUnits begin)
void computeABIInfo(CodeGenModule &CGM, CGFunctionInfo &FI)
Compute the ABI information of a swiftcall function.
SwiftAggLowering(CodeGenModule &CGM)
bool shouldPassCXXRecordIndirectly(CodeGenModule &CGM, const CXXRecordDecl *record)
Should a C++ record type be passed and returned indirectly?
CGFunctionInfo - Class to encapsulate the information about a function definition.
This class organizes the cross-function state that is used while generating LLVM code.
std::pair< llvm::StructType *, llvm::Type * > getCoerceAndExpandTypes() const
Return the types for a coerce-and-expand operation.
bool isLegalVectorType(CodeGenModule &CGM, CharUnits vectorSize, llvm::VectorType *vectorTy)
Is the given vector type "legal" for Swift's perspective on the current platform?
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
llvm::function_ref< void(CharUnits offset, llvm::Type *type)> EnumerationCallback
Represents a C++ struct/union/class.
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.