Go to the documentation of this file.
14 #ifndef LLVM_CLANG_CODEGEN_SWIFTCALLINGCONV_H
15 #define LLVM_CLANG_CODEGEN_SWIFTCALLINGCONV_H
20 #include "llvm/Support/TrailingObjects.h"
32 class ASTRecordLayout;
54 bool Finished =
false;
60 addEntry(
nullptr, begin, end);
74 assert(Finished &&
"didn't finish lowering before calling empty()");
75 return Entries.empty();
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,
YAML serialization mapping.
bool empty() const
Does this lowering require passing any data?
A (possibly-)qualified type.
void addOpaqueData(CharUnits begin, CharUnits end)
Represents a member of a struct/union/class.
bool mustPassRecordIndirectly(CodeGenModule &CGM, const RecordDecl *record)
Is the given record type required to be passed and returned indirectly because of language restrictio...
void enumerateComponents(EnumerationCallback callback) const
Enumerate the expanded components of this type.
The base class of the type hierarchy.
ABIArgInfo - Helper class to encapsulate information about how a specific C type should be passed to ...
ABIArgInfo classifyReturnType(CodeGenModule &CGM, CanQualType type)
Classify the rules for how to return a particular type.
llvm::function_ref< void(CharUnits offset, CharUnits end, llvm::Type *type)> EnumerationCallback
std::pair< llvm::StructType *, llvm::Type * > getCoerceAndExpandTypes() const
Return the types for a coerce-and-expand operation.
bool shouldPassIndirectly(bool asReturnValue) const
According to the target Swift ABI, should a value with this lowering be passed indirectly?
SwiftAggLowering(CodeGenModule &CGM)
void computeABIInfo(CodeGenModule &CGM, CGFunctionInfo &FI)
Compute the ABI information of a swiftcall function.
bool isLegalIntegerType(CodeGenModule &CGM, llvm::IntegerType *type)
Is the given integer type "legal" for Swift's perspective on the current platform?
bool isLegalVectorType(CodeGenModule &CGM, CharUnits vectorSize, llvm::VectorType *vectorTy)
Is the given vector type "legal" for Swift's perspective on the current platform?
CharUnits getMaximumVoluntaryIntegerSize(CodeGenModule &CGM)
Return the maximum voluntary integer size for the current target.
ASTRecordLayout - This class contains layout information for one RecordDecl, which is a struct/union/...
This class organizes the cross-function state that is used while generating LLVM code.
CharUnits getNaturalAlignment(CodeGenModule &CGM, llvm::Type *type)
Return the Swift CC's notion of the natural alignment of a type.
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.
ABIArgInfo classifyArgumentType(CodeGenModule &CGM, CanQualType type)
Classify the rules for how to pass a particular type.
std::pair< llvm::Type *, unsigned > splitLegalVectorType(CodeGenModule &CGM, CharUnits vectorSize, llvm::VectorType *vectorTy)
Minimally split a legal vector type.
void addTypedData(QualType type, CharUnits begin)
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...
CharUnits - This is an opaque type for sizes expressed in character units.
Represents a struct/union/class.
bool isSwiftErrorLoweredInRegister(CodeGenModule &CGM)
Is swifterror lowered to a register by the target ABI?