Skip to content

Commit 0adfc0b

Browse files
committed
[IRGen] Defined TypeInfo for SwiftExecutor.
1 parent 4fd5c93 commit 0adfc0b

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

lib/IRGen/GenType.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,6 +1481,20 @@ const TypeInfo &TypeConverter::getTaskContinuationFunctionPtrTypeInfo() {
14811481
return *TaskContinuationFunctionPtrTI;
14821482
}
14831483

1484+
const TypeInfo &IRGenModule::getSwiftExecutorPtrTypeInfo() {
1485+
return Types.getSwiftExecutorPtrTypeInfo();
1486+
}
1487+
1488+
const TypeInfo &TypeConverter::getSwiftExecutorPtrTypeInfo() {
1489+
if (SwiftExecutorPtrTI) return *SwiftExecutorPtrTI;
1490+
SwiftExecutorPtrTI = createUnmanagedStorageType(IGM.SwiftExecutorPtrTy,
1491+
ReferenceCounting::Unknown,
1492+
/*isOptional*/ false);
1493+
SwiftExecutorPtrTI->NextConverted = FirstType;
1494+
FirstType = SwiftExecutorPtrTI;
1495+
return *SwiftExecutorPtrTI;
1496+
}
1497+
14841498
const LoadableTypeInfo &
14851499
IRGenModule::getReferenceObjectTypeInfo(ReferenceCounting refcounting) {
14861500
switch (refcounting) {

lib/IRGen/GenType.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ class TypeConverter {
107107
const TypeInfo *TypeMetadataPtrTI = nullptr;
108108
const TypeInfo *SwiftContextPtrTI = nullptr;
109109
const TypeInfo *TaskContinuationFunctionPtrTI = nullptr;
110+
const TypeInfo *SwiftExecutorPtrTI = nullptr;
110111
const TypeInfo *ObjCClassPtrTI = nullptr;
111112
const LoadableTypeInfo *EmptyTI = nullptr;
112113
const LoadableTypeInfo *IntegerLiteralTI = nullptr;
@@ -185,6 +186,7 @@ class TypeConverter {
185186
const TypeInfo &getTypeMetadataPtrTypeInfo();
186187
const TypeInfo &getSwiftContextPtrTypeInfo();
187188
const TypeInfo &getTaskContinuationFunctionPtrTypeInfo();
189+
const TypeInfo &getSwiftExecutorPtrTypeInfo();
188190
const TypeInfo &getObjCClassPtrTypeInfo();
189191
const LoadableTypeInfo &getWitnessTablePtrTypeInfo();
190192
const LoadableTypeInfo &getEmptyTypeInfo();

lib/IRGen/IRGenModule.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,7 @@ class IRGenModule {
895895
const TypeInfo &getTypeMetadataPtrTypeInfo();
896896
const TypeInfo &getSwiftContextPtrTypeInfo();
897897
const TypeInfo &getTaskContinuationFunctionPtrTypeInfo();
898+
const TypeInfo &getSwiftExecutorPtrTypeInfo();
898899
const TypeInfo &getObjCClassPtrTypeInfo();
899900
const LoadableTypeInfo &getOpaqueStorageTypeInfo(Size size, Alignment align);
900901
const LoadableTypeInfo &

0 commit comments

Comments
 (0)