mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +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:
@@ -71,7 +71,7 @@ public:
|
||||
};
|
||||
|
||||
static SILSpecializeAttr *create(SILModule &M,
|
||||
GenericSignature *specializedSignature,
|
||||
GenericSignature specializedSignature,
|
||||
bool exported, SpecializationKind kind);
|
||||
|
||||
bool isExported() const {
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
return kind;
|
||||
}
|
||||
|
||||
GenericSignature *getSpecializedSignature() const {
|
||||
GenericSignature getSpecializedSignature() const {
|
||||
return specializedSignature;
|
||||
}
|
||||
|
||||
@@ -103,11 +103,11 @@ public:
|
||||
private:
|
||||
SpecializationKind kind;
|
||||
bool exported;
|
||||
GenericSignature *specializedSignature;
|
||||
GenericSignature specializedSignature;
|
||||
SILFunction *F = nullptr;
|
||||
|
||||
SILSpecializeAttr(bool exported, SpecializationKind kind,
|
||||
GenericSignature *specializedSignature);
|
||||
GenericSignature specializedSignature);
|
||||
};
|
||||
|
||||
/// SILFunction - A function body that has been lowered to SIL. This consists of
|
||||
|
||||
Reference in New Issue
Block a user