@@ -3326,6 +3326,10 @@ class ValueDecl : public Decl {
33263326 // / Get the decl for this value's opaque result type, if it has one.
33273327 OpaqueTypeDecl *getOpaqueResultTypeDecl () const ;
33283328
3329+ // / Gets the decl for this value's opaque result type if it has already been
3330+ // / computed, or `nullopt` otherwise. This should only be used for dumping.
3331+ std::optional<OpaqueTypeDecl *> getCachedOpaqueResultTypeDecl () const ;
3332+
33293333 // / Get the representative for this value's opaque result type, if it has one.
33303334 // / Returns a `TypeRepr` instead of an `OpaqueReturnTypeRepr` because 'some'
33313335 // / types might appear in one or more structural positions, e.g. (some P,
@@ -7769,6 +7773,10 @@ class AbstractFunctionDecl : public GenericContext, public ValueDecl {
77697773 // / Retrieves the thrown interface type.
77707774 Type getThrownInterfaceType () const ;
77717775
7776+ // / Returns the thrown interface type of this function if it has already been
7777+ // / computed, otherwise `nullopt`. This should only be used for dumping.
7778+ std::optional<Type> getCachedThrownInterfaceType () const ;
7779+
77727780 // / Retrieve the "effective" thrown interface type, or std::nullopt if
77737781 // / this function cannot throw.
77747782 // /
@@ -8329,6 +8337,10 @@ class FuncDecl : public AbstractFunctionDecl {
83298337 // / Retrieve the result interface type of this function.
83308338 Type getResultInterfaceType () const ;
83318339
8340+ // / Returns the result interface type of this function if it has already been
8341+ // / computed, otherwise `nullopt`. This should only be used for dumping.
8342+ std::optional<Type> getCachedResultInterfaceType () const ;
8343+
83328344 // / isUnaryOperator - Determine whether this is a unary operator
83338345 // / implementation. This check is a syntactic rather than type-based check,
83348346 // / which looks at the number of parameters specified, in order to allow
@@ -9529,6 +9541,10 @@ class MacroDecl : public GenericContext, public ValueDecl {
95299541 // / Retrieve the interface type produced when expanding this macro.
95309542 Type getResultInterfaceType () const ;
95319543
9544+ // / Returns the result interface type of this macro if it has already been
9545+ // / computed, otherwise `nullopt`. This should only be used for dumping.
9546+ std::optional<Type> getCachedResultInterfaceType () const ;
9547+
95329548 // / Determine the contexts in which this macro can be applied.
95339549 MacroRoles getMacroRoles () const ;
95349550
0 commit comments