@@ -3879,66 +3879,6 @@ enum class KnownDerivableProtocolKind : uint8_t {
3879
3879
Actor,
3880
3880
};
3881
3881
3882
- class ProtocolRethrowsRequirementList {
3883
- public:
3884
- typedef std::pair<Type, ValueDecl *> Entry;
3885
-
3886
- private:
3887
- ArrayRef<Entry> entries;
3888
-
3889
- public:
3890
- ProtocolRethrowsRequirementList (ArrayRef<Entry> entries) : entries(entries) {}
3891
- ProtocolRethrowsRequirementList () : entries() {}
3892
-
3893
- typedef const Entry *const_iterator;
3894
- typedef const_iterator iterator;
3895
-
3896
- const_iterator begin () const { return entries.begin (); }
3897
- const_iterator end () const { return entries.end (); }
3898
-
3899
- size_t size () const { return entries.size (); }
3900
-
3901
- void print (raw_ostream &OS) const ;
3902
-
3903
- SWIFT_DEBUG_DUMP;
3904
-
3905
- friend bool operator ==(const ProtocolRethrowsRequirementList &lhs,
3906
- const ProtocolRethrowsRequirementList &rhs) {
3907
- if (lhs.size () != rhs.size ()) {
3908
- return false ;
3909
- }
3910
- auto lhsIter = lhs.begin ();
3911
- auto rhsIter = rhs.begin ();
3912
- while (lhsIter != lhs.end () && rhsIter != rhs.end ()) {
3913
- if (lhsIter->first ->isEqual (rhsIter->first )) {
3914
- return false ;
3915
- }
3916
- if (lhsIter->second != rhsIter->second ) {
3917
- return false ;
3918
- }
3919
- }
3920
- return true ;
3921
- }
3922
-
3923
- friend bool operator !=(const ProtocolRethrowsRequirementList &lhs,
3924
- const ProtocolRethrowsRequirementList &rhs) {
3925
- return !(lhs == rhs);
3926
- }
3927
-
3928
- friend llvm::hash_code hash_value (
3929
- const ProtocolRethrowsRequirementList &list) {
3930
- return llvm::hash_combine (list.size ()); // it is good enought for
3931
- // llvm::hash_code hash;
3932
- // for (auto entry : list) {
3933
- // hash = llvm::hash_combine(hash, entry.first->getCanonicalType());
3934
- // hash = llvm::hash_combine(hash, entry.second);
3935
- // }
3936
- // return hash;
3937
- }
3938
- };
3939
-
3940
- void simple_display (raw_ostream &out, const ProtocolRethrowsRequirementList reqs);
3941
-
3942
3882
// / ProtocolDecl - A declaration of a protocol, for example:
3943
3883
// /
3944
3884
// / protocol Drawable {
@@ -4120,9 +4060,6 @@ class ProtocolDecl final : public NominalTypeDecl {
4120
4060
// / contain 'Self' in 'parameter' or 'other' position.
4121
4061
bool existentialTypeSupported () const ;
4122
4062
4123
- ProtocolRethrowsRequirementList getRethrowingRequirements () const ;
4124
- bool isRethrowingProtocol () const ;
4125
-
4126
4063
private:
4127
4064
void computeKnownProtocolKind () const ;
4128
4065
@@ -5532,23 +5469,6 @@ class ImportAsMemberStatus {
5532
5469
}
5533
5470
};
5534
5471
5535
- enum class FunctionRethrowingKind : uint8_t {
5536
- // / The function is not throwing
5537
- None,
5538
-
5539
- // / The function rethrows by closure
5540
- ByClosure,
5541
-
5542
- // / The function rethrows by conformance
5543
- ByConformance,
5544
-
5545
- // / The function throws
5546
- Throws,
5547
-
5548
- // / The function throwing determinate is invalid
5549
- Invalid
5550
- };
5551
-
5552
5472
// / Base class for function-like declarations.
5553
5473
class AbstractFunctionDecl : public GenericContext , public ValueDecl {
5554
5474
friend class NeedsNewVTableEntryRequest ;
@@ -5751,8 +5671,6 @@ class AbstractFunctionDecl : public GenericContext, public ValueDecl {
5751
5671
// / Returns true if the function body throws.
5752
5672
bool hasThrows () const { return Bits.AbstractFunctionDecl .Throws ; }
5753
5673
5754
- FunctionRethrowingKind getRethrowingKind () const ;
5755
-
5756
5674
// FIXME: Hack that provides names with keyword arguments for accessors.
5757
5675
DeclName getEffectiveFullName () const ;
5758
5676
0 commit comments