File tree Expand file tree Collapse file tree 4 files changed +5
-18
lines changed Expand file tree Collapse file tree 4 files changed +5
-18
lines changed Original file line number Diff line number Diff line change @@ -20,3 +20,4 @@ SWIFT_TYPEID(Type)
20
20
SWIFT_TYPEID(PropertyDelegateBackingPropertyInfo)
21
21
SWIFT_TYPEID(PropertyDelegateTypeInfo)
22
22
SWIFT_TYPEID_NAMED(CustomAttr *, CustomAttr)
23
+ SWIFT_TYPEID_NAMED(TypeAliasDecl *, TypeAliasDecl)
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ struct PropertyDelegateBackingPropertyInfo;
26
26
struct PropertyDelegateTypeInfo ;
27
27
class Type ;
28
28
class VarDecl ;
29
+ class TypeAliasDecl ;
29
30
30
31
#define SWIFT_AST_TYPEID_ZONE 1
31
32
Original file line number Diff line number Diff line change @@ -551,7 +551,7 @@ class PropertyDelegateBackingPropertyInfoRequest :
551
551
// / Retrieve the structural type of an alias type.
552
552
class StructuralTypeRequest :
553
553
public SimpleRequest<StructuralTypeRequest,
554
- CacheKind::SeparatelyCached ,
554
+ CacheKind::Cached ,
555
555
Type,
556
556
TypeAliasDecl*> {
557
557
public:
@@ -568,13 +568,10 @@ class StructuralTypeRequest :
568
568
void diagnoseCycle (DiagnosticEngine &diags) const ;
569
569
void noteCycleStep (DiagnosticEngine &diags) const ;
570
570
571
- // Separate caching.
572
- bool isCached () const { return true ; };
573
- Optional<Type> getCachedResult () const ;
574
- void cacheResult (Type value) const ;
571
+ // Caching.
572
+ bool isCached () const { return true ; }
575
573
};
576
574
577
-
578
575
// Allow AnyValue to compare two Type values, even though Type doesn't
579
576
// support ==.
580
577
template <>
Original file line number Diff line number Diff line change @@ -672,15 +672,3 @@ void StructuralTypeRequest::diagnoseCycle(DiagnosticEngine &diags) const {
672
672
void StructuralTypeRequest::noteCycleStep (DiagnosticEngine &diags) const {
673
673
diags.diagnose (SourceLoc (), diag::circular_reference_through);
674
674
}
675
-
676
- Optional<Type> StructuralTypeRequest::getCachedResult () const {
677
- auto decl = std::get<0 >(getStorage ());
678
- if (decl->getUnderlyingTypeLoc ().getType ())
679
- return decl->getUnderlyingTypeLoc ().getType ();
680
- return None;
681
- }
682
-
683
- void StructuralTypeRequest::cacheResult (Type value) const {
684
- auto decl = std::get<0 >(getStorage ());
685
- decl->getUnderlyingTypeLoc ().setType (value);
686
- }
You can’t perform that action at this time.
0 commit comments