class SwiftAggLowering
Declaration
class SwiftAggLowering { /* full declaration omitted */ };
Declared at: clang/include/clang/CodeGen/SwiftCallingConv.h:41
Member Variables
- private clang::CodeGen::CodeGenModule& CGM
- private SmallVector<clang::CodeGen::swiftcall:: SwiftAggLowering::StorageEntry, 4> Entries
- private bool Finished = false
Method Overview
- public SwiftAggLowering(clang::CodeGen::CodeGenModule & CGM)
- private void addBitFieldData(const clang::FieldDecl * field, clang::CharUnits begin, uint64_t bitOffset)
- private void addEntry(llvm::Type * type, clang::CharUnits begin, clang::CharUnits end)
- private void addLegalTypedData(llvm::Type * type, clang::CharUnits begin, clang::CharUnits end)
- public void addOpaqueData(clang::CharUnits begin, clang::CharUnits end)
- public void addTypedData(clang::QualType type, clang::CharUnits begin)
- public void addTypedData(const clang::RecordDecl * record, clang::CharUnits begin)
- public void addTypedData(const clang::RecordDecl * record, clang::CharUnits begin, const clang::ASTRecordLayout & layout)
- public void addTypedData(llvm::Type * type, clang::CharUnits begin)
- public void addTypedData(llvm::Type * type, clang::CharUnits begin, clang::CharUnits end)
- public bool empty() const
- public void enumerateComponents(clang::CodeGen::swiftcall::SwiftAggLowering::EnumerationCallback callback) const
- public void finish()
- public std::pair<llvm::StructType *, llvm::Type *> getCoerceAndExpandTypes() const
- private static bool shouldMergeEntries(const clang::CodeGen::swiftcall::SwiftAggLowering::StorageEntry & first, const clang::CodeGen::swiftcall::SwiftAggLowering::StorageEntry & second, clang::CharUnits chunkSize)
- public bool shouldPassIndirectly(bool asReturnValue) const
- private void splitVectorEntry(unsigned int index)
Methods
¶SwiftAggLowering(
clang::CodeGen::CodeGenModule& CGM)
SwiftAggLowering(
clang::CodeGen::CodeGenModule& CGM)
Declared at: clang/include/clang/CodeGen/SwiftCallingConv.h:57
Parameters
¶void addBitFieldData(
const clang::FieldDecl* field,
clang::CharUnits begin,
uint64_t bitOffset)
void addBitFieldData(
const clang::FieldDecl* field,
clang::CharUnits begin,
uint64_t bitOffset)
Declared at: clang/include/clang/CodeGen/SwiftCallingConv.h:111
Parameters
- const clang::FieldDecl* field
- clang::CharUnits begin
- uint64_t bitOffset
¶void addEntry(llvm::Type* type,
clang::CharUnits begin,
clang::CharUnits end)
void addEntry(llvm::Type* type,
clang::CharUnits begin,
clang::CharUnits end)
Declared at: clang/include/clang/CodeGen/SwiftCallingConv.h:114
Parameters
- llvm::Type* type
- clang::CharUnits begin
- clang::CharUnits end
¶void addLegalTypedData(llvm::Type* type,
clang::CharUnits begin,
clang::CharUnits end)
void addLegalTypedData(llvm::Type* type,
clang::CharUnits begin,
clang::CharUnits end)
Declared at: clang/include/clang/CodeGen/SwiftCallingConv.h:113
Parameters
- llvm::Type* type
- clang::CharUnits begin
- clang::CharUnits end
¶void addOpaqueData(clang::CharUnits begin,
clang::CharUnits end)
void addOpaqueData(clang::CharUnits begin,
clang::CharUnits end)
Declared at: clang/include/clang/CodeGen/SwiftCallingConv.h:59
Parameters
- clang::CharUnits begin
- clang::CharUnits end
¶void addTypedData(clang::QualType type,
clang::CharUnits begin)
void addTypedData(clang::QualType type,
clang::CharUnits begin)
Declared at: clang/include/clang/CodeGen/SwiftCallingConv.h:63
Parameters
- clang::QualType type
- clang::CharUnits begin
¶void addTypedData(const clang::RecordDecl* record,
clang::CharUnits begin)
void addTypedData(const clang::RecordDecl* record,
clang::CharUnits begin)
Declared at: clang/include/clang/CodeGen/SwiftCallingConv.h:64
Parameters
- const clang::RecordDecl* record
- clang::CharUnits begin
¶void addTypedData(
const clang::RecordDecl* record,
clang::CharUnits begin,
const clang::ASTRecordLayout& layout)
void addTypedData(
const clang::RecordDecl* record,
clang::CharUnits begin,
const clang::ASTRecordLayout& layout)
Declared at: clang/include/clang/CodeGen/SwiftCallingConv.h:65
Parameters
- const clang::RecordDecl* record
- clang::CharUnits begin
- const clang::ASTRecordLayout& layout
¶void addTypedData(llvm::Type* type,
clang::CharUnits begin)
void addTypedData(llvm::Type* type,
clang::CharUnits begin)
Declared at: clang/include/clang/CodeGen/SwiftCallingConv.h:67
Parameters
- llvm::Type* type
- clang::CharUnits begin
¶void addTypedData(llvm::Type* type,
clang::CharUnits begin,
clang::CharUnits end)
void addTypedData(llvm::Type* type,
clang::CharUnits begin,
clang::CharUnits end)
Declared at: clang/include/clang/CodeGen/SwiftCallingConv.h:68
Parameters
- llvm::Type* type
- clang::CharUnits begin
- clang::CharUnits end
¶bool empty() const
bool empty() const
Description
Does this lowering require passing any data?
Declared at: clang/include/clang/CodeGen/SwiftCallingConv.h:73
¶void enumerateComponents(
clang::CodeGen::swiftcall::SwiftAggLowering::
EnumerationCallback callback) const
void enumerateComponents(
clang::CodeGen::swiftcall::SwiftAggLowering::
EnumerationCallback callback) const
Description
Enumerate the expanded components of this type. The component types will always be legal vector, floating-point, integer, or pointer types.
Declared at: clang/include/clang/CodeGen/SwiftCallingConv.h:98
Parameters
- clang::CodeGen::swiftcall::SwiftAggLowering:: EnumerationCallback callback
¶void finish()
void finish()
Declared at: clang/include/clang/CodeGen/SwiftCallingConv.h:70
¶std::pair<llvm::StructType*, llvm::Type*>
getCoerceAndExpandTypes() const
std::pair<llvm::StructType*, llvm::Type*>
getCoerceAndExpandTypes() const
Description
Return the types for a coerce-and-expand operation. The first type matches the memory layout of the data that's been added to this structure, including explicit [N x i8] arrays for any internal padding. The second type removes any internal padding members and, if only one element remains, is simply that element type.
Declared at: clang/include/clang/CodeGen/SwiftCallingConv.h:108
¶static bool shouldMergeEntries(
const clang::CodeGen::swiftcall::
SwiftAggLowering::StorageEntry& first,
const clang::CodeGen::swiftcall::
SwiftAggLowering::StorageEntry& second,
clang::CharUnits chunkSize)
static bool shouldMergeEntries(
const clang::CodeGen::swiftcall::
SwiftAggLowering::StorageEntry& first,
const clang::CodeGen::swiftcall::
SwiftAggLowering::StorageEntry& second,
clang::CharUnits chunkSize)
Declared at: clang/include/clang/CodeGen/SwiftCallingConv.h:116
Parameters
- const clang::CodeGen::swiftcall:: SwiftAggLowering::StorageEntry& first
- const clang::CodeGen::swiftcall:: SwiftAggLowering::StorageEntry& second
- clang::CharUnits chunkSize
¶bool shouldPassIndirectly(
bool asReturnValue) const
bool shouldPassIndirectly(
bool asReturnValue) const
Description
According to the target Swift ABI, should a value with this lowering be passed indirectly? Note that this decision is based purely on the data layout of the value and does not consider whether the type is address-only, must be passed indirectly to match a function abstraction pattern, or anything else that is expected to be handled by high-level lowering.
Declared at: clang/include/clang/CodeGen/SwiftCallingConv.h:89
Parameters
- bool asReturnValue
- - if true, answer whether it should be passed indirectly as a return value; if false, answer whether it should be passed indirectly as an argument
¶void splitVectorEntry(unsigned int index)
void splitVectorEntry(unsigned int index)
Declared at: clang/include/clang/CodeGen/SwiftCallingConv.h:115
Parameters
- unsigned int index