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 {
242242 return 0 ;
243243 }
244244
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+
245263 bool isArgumentIndexOfIndirectErrorResult (unsigned idx) {
246264 unsigned indirectResults = getNumIndirectSILResults ();
247265 return idx >= indirectResults &&
You can’t perform that action at this time.
0 commit comments