File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,14 @@ AsyncContextLayout irgen::getAsyncContextLayout(
103
103
auto parameters = substitutedType->getParameters ();
104
104
SILFunctionConventions fnConv (substitutedType, IGF.getSILModule ());
105
105
106
+ // AsyncContext * __ptrauth_swift_async_context_parent Parent;
107
+ {
108
+ auto ty = SILType ();
109
+ auto &ti = IGF.IGM .getSwiftContextPtrTypeInfo ();
110
+ valTypes.push_back (ty);
111
+ typeInfos.push_back (&ti);
112
+ }
113
+
106
114
// SwiftError *errorResult;
107
115
auto errorCanType = IGF.IGM .Context .getExceptionType ();
108
116
auto errorType = SILType::getPrimitiveObjectType (errorCanType);
Original file line number Diff line number Diff line change @@ -93,9 +93,11 @@ namespace irgen {
93
93
94
94
private:
95
95
enum class FixedIndex : unsigned {
96
- Error = 0 ,
96
+ Parent = 0 ,
97
+ Error = 1 ,
97
98
};
98
99
enum class FixedCount : unsigned {
100
+ Parent = 1 ,
99
101
Error = 1 ,
100
102
};
101
103
IRGenFunction &IGF;
@@ -111,6 +113,7 @@ namespace irgen {
111
113
Optional<TrailingWitnessInfo> trailingWitnessInfo;
112
114
SmallVector<ArgumentInfo, 4 > argumentInfos;
113
115
116
+ unsigned getParentIndex () { return (unsigned )FixedIndex::Parent; }
114
117
unsigned getErrorIndex () { return (unsigned )FixedIndex::Error; }
115
118
unsigned getFirstIndirectReturnIndex () {
116
119
return getErrorIndex () + getErrorCount ();
@@ -156,6 +159,7 @@ namespace irgen {
156
159
}
157
160
158
161
public:
162
+ ElementLayout getParentLayout () { return getElement (getParentIndex ()); }
159
163
bool canHaveError () { return canHaveValidError; }
160
164
ElementLayout getErrorLayout () { return getElement (getErrorIndex ()); }
161
165
unsigned getErrorCount () { return (unsigned )FixedCount::Error; }
You can’t perform that action at this time.
0 commit comments