mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Define the FieldRecord LLVM type
An individual field record for a nominal type consists of: - 32-bit general purpose flags, - 32-bit relative offset to the encoded type reference string, or 32-bit relative offset to the mangled name of the type defined in another image, and - 32-bit relative offset to the field name string.
This commit is contained in:
@@ -286,6 +286,13 @@ IRGenModule::IRGenModule(IRGenModuleDispatcher &dispatcher, SourceFile *SF,
|
||||
TypeMetadataRecordPtrTy
|
||||
= TypeMetadataRecordTy->getPointerTo(DefaultAS);
|
||||
|
||||
FieldRecordTy = createStructType(*this, "swift.field_record", {
|
||||
Int32Ty, // Flags
|
||||
RelativeAddressTy, // Offset to metadata or mangled name for external type
|
||||
RelativeAddressTy, // Offset to field name
|
||||
});
|
||||
FieldRecordPtrTy = FieldRecordTy->getPointerTo(DefaultAS);
|
||||
|
||||
FixedBufferTy = nullptr;
|
||||
for (unsigned i = 0; i != MaxNumValueWitnesses; ++i)
|
||||
ValueWitnessTys[i] = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user