@@ -487,21 +487,6 @@ namespace {
487
487
488
488
static constexpr struct ForGetter_t { } ForGetter{};
489
489
static constexpr struct ForSetter_t { } ForSetter{};
490
-
491
- #define FOREACH_FAMILY (FAMILY ) \
492
- FAMILY (Alloc, " alloc" ) \
493
- FAMILY (Copy, " copy" ) \
494
- FAMILY (Init, " init" ) \
495
- FAMILY (MutableCopy, " mutableCopy" ) \
496
- FAMILY (New, " new" )
497
-
498
- // Note that these are in parallel with 'prefixes', below.
499
- enum class Family {
500
- None,
501
- #define GET_LABEL (LABEL, PREFIX ) LABEL,
502
- FOREACH_FAMILY (GET_LABEL)
503
- #undef GET_LABEL
504
- };
505
490
506
491
Selector () = default ;
507
492
@@ -571,31 +556,6 @@ namespace {
571
556
StringRef str () const {
572
557
return Text;
573
558
}
574
-
575
- // / Return the family string of this selector.
576
- Family getFamily () const {
577
- StringRef text = str ();
578
- while (!text.empty () && text[0 ] == ' _' ) text = text.substr (1 );
579
-
580
- #define CHECK_PREFIX (LABEL, PREFIX ) \
581
- if (hasPrefix (text, PREFIX)) return Family::LABEL;
582
- FOREACH_FAMILY (CHECK_PREFIX)
583
- #undef CHECK_PREFIX
584
-
585
- return Family::None;
586
- }
587
-
588
- private:
589
- // / Does the given selector start with the given string as a
590
- // / prefix, in the sense of the selector naming conventions?
591
- static bool hasPrefix (StringRef text, StringRef prefix) {
592
- if (!text.startswith (prefix)) return false ;
593
- if (text.size () == prefix.size ()) return true ;
594
- assert (text.size () > prefix.size ());
595
- return !clang::isLowercase (text[prefix.size ()]);
596
- }
597
-
598
- #undef FOREACH_FAMILY
599
559
};
600
560
} // end anonymous namespace
601
561
0 commit comments