mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[NFC] Adopt TypeBase-isms for GenericSignature
Structurally prevent a number of common anti-patterns involving generic signatures by separating the interface into GenericSignature and the implementation into GenericSignatureBase. In particular, this allows the comparison operators to be deleted which forces callers to canonicalize the signature or ask to compare pointers explicitly.
This commit is contained in:
@@ -197,7 +197,7 @@ class Serializer : public SerializerBase {
|
||||
index_block::LOCAL_DECL_CONTEXT_OFFSETS>
|
||||
LocalDeclContextsToSerialize;
|
||||
|
||||
ASTBlockRecordKeeper<const GenericSignature *, GenericSignatureID,
|
||||
ASTBlockRecordKeeper<GenericSignature, GenericSignatureID,
|
||||
index_block::GENERIC_SIGNATURE_OFFSETS>
|
||||
GenericSignaturesToSerialize;
|
||||
|
||||
@@ -314,7 +314,7 @@ private:
|
||||
void writeASTBlockEntity(Type ty);
|
||||
|
||||
/// Writes a generic signature.
|
||||
void writeASTBlockEntity(const GenericSignature *sig);
|
||||
void writeASTBlockEntity(GenericSignature sig);
|
||||
|
||||
/// Writes a substitution map.
|
||||
void writeASTBlockEntity(const SubstitutionMap substitutions);
|
||||
@@ -427,7 +427,7 @@ public:
|
||||
/// Records the use of the given generic signature.
|
||||
///
|
||||
/// The GenericSignature will be scheduled for serialization if necessary.
|
||||
GenericSignatureID addGenericSignatureRef(const GenericSignature *sig);
|
||||
GenericSignatureID addGenericSignatureRef(GenericSignature sig);
|
||||
|
||||
/// Records the use of the given substitution map.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user