@@ -141,11 +141,17 @@ public enum ArgumentConvention {
141141 /// indirectly is recorded in the pack type.
142142 case packGuaranteed
143143
144+ /// This argument is a pack of indirect return value addresses. The
145+ /// addresses are stored in the pack by the caller and read out by the
146+ /// callee; within the callee, they are individually treated like
147+ /// indirectOut arguments.
148+ case packOut
149+
144150 public var isIndirect : Bool {
145151 switch self {
146152 case . indirectIn, . indirectInGuaranteed,
147153 . indirectInout, . indirectInoutAliasable, . indirectOut,
148- . packInout, . packOwned, . packGuaranteed:
154+ . packOut , . packInout, . packOwned, . packGuaranteed:
149155 return true
150156 case . directOwned, . directUnowned, . directGuaranteed:
151157 return false
@@ -159,7 +165,19 @@ public enum ArgumentConvention {
159165 return true
160166 case . directOwned, . directUnowned, . directGuaranteed,
161167 . indirectInout, . indirectInoutAliasable, . indirectOut,
162- . packInout:
168+ . packOut, . packInout:
169+ return false
170+ }
171+ }
172+
173+ public var isIndirectOut : Bool {
174+ switch self {
175+ case . indirectOut, . packOut:
176+ return true
177+ case . indirectInGuaranteed, . directGuaranteed, . packGuaranteed,
178+ . indirectIn, . directOwned, . directUnowned,
179+ . indirectInout, . indirectInoutAliasable,
180+ . packInout, . packOwned:
163181 return false
164182 }
165183 }
@@ -170,7 +188,7 @@ public enum ArgumentConvention {
170188 return true
171189 case . indirectIn, . directOwned, . directUnowned,
172190 . indirectInout, . indirectInoutAliasable, . indirectOut,
173- . packInout, . packOwned:
191+ . packOut , . packInout, . packOwned:
174192 return false
175193 }
176194 }
@@ -181,6 +199,7 @@ public enum ArgumentConvention {
181199 . indirectOut,
182200 . indirectInGuaranteed,
183201 . indirectInout,
202+ . packOut,
184203 . packInout,
185204 . packOwned,
186205 . packGuaranteed:
@@ -207,6 +226,7 @@ public enum ArgumentConvention {
207226 . directUnowned,
208227 . directGuaranteed,
209228 . directOwned,
229+ . packOut,
210230 . packOwned,
211231 . packGuaranteed:
212232 return false
@@ -233,6 +253,7 @@ extension BridgedArgumentConvention {
233253 case . Direct_Owned: return . directOwned
234254 case . Direct_Unowned: return . directUnowned
235255 case . Direct_Guaranteed: return . directGuaranteed
256+ case . Pack_Out: return . packOut
236257 case . Pack_Inout: return . packInout
237258 case . Pack_Owned: return . packOwned
238259 case . Pack_Guaranteed: return . packGuaranteed
0 commit comments