@@ -3879,66 +3879,6 @@ enum class KnownDerivableProtocolKind : uint8_t {
38793879 Actor,
38803880};
38813881
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-
39423882// / ProtocolDecl - A declaration of a protocol, for example:
39433883// /
39443884// / protocol Drawable {
@@ -4120,9 +4060,6 @@ class ProtocolDecl final : public NominalTypeDecl {
41204060 // / contain 'Self' in 'parameter' or 'other' position.
41214061 bool existentialTypeSupported () const ;
41224062
4123- ProtocolRethrowsRequirementList getRethrowingRequirements () const ;
4124- bool isRethrowingProtocol () const ;
4125-
41264063private:
41274064 void computeKnownProtocolKind () const ;
41284065
@@ -5532,23 +5469,6 @@ class ImportAsMemberStatus {
55325469 }
55335470};
55345471
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-
55525472// / Base class for function-like declarations.
55535473class AbstractFunctionDecl : public GenericContext , public ValueDecl {
55545474 friend class NeedsNewVTableEntryRequest ;
@@ -5751,8 +5671,6 @@ class AbstractFunctionDecl : public GenericContext, public ValueDecl {
57515671 // / Returns true if the function body throws.
57525672 bool hasThrows () const { return Bits.AbstractFunctionDecl .Throws ; }
57535673
5754- FunctionRethrowingKind getRethrowingKind () const ;
5755-
57565674 // FIXME: Hack that provides names with keyword arguments for accessors.
57575675 DeclName getEffectiveFullName () const ;
57585676
0 commit comments