File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -242,6 +242,24 @@ class SILFunctionConventions {
242
242
return 0 ;
243
243
}
244
244
245
+ std::optional<SILResultInfo> getIndirectErrorResult () const {
246
+ if (!silConv.loweredAddresses )
247
+ return std::nullopt;
248
+ auto info = funcTy->getOptionalErrorResult ();
249
+ if (!info)
250
+ return std::nullopt;
251
+ if (info->getConvention () != ResultConvention::Indirect)
252
+ return std::nullopt;
253
+ return info;
254
+ }
255
+
256
+ SILType getIndirectErrorResultType (TypeExpansionContext context) const {
257
+ auto result = getIndirectErrorResult ();
258
+ if (!result)
259
+ return SILType ();
260
+ return getSILType (*result, context);
261
+ }
262
+
245
263
bool isArgumentIndexOfIndirectErrorResult (unsigned idx) {
246
264
unsigned indirectResults = getNumIndirectSILResults ();
247
265
return idx >= indirectResults &&
You can’t perform that action at this time.
0 commit comments