File tree Expand file tree Collapse file tree 2 files changed +0
-10
lines changed Expand file tree Collapse file tree 2 files changed +0
-10
lines changed Original file line number Diff line number Diff line change @@ -3541,8 +3541,6 @@ class EnumDecl final : public NominalTypeDecl {
3541
3541
return SourceRange (EnumLoc, getBraces ().End );
3542
3542
}
3543
3543
3544
- EnumElementDecl *getElement (Identifier Name) const ;
3545
-
3546
3544
public:
3547
3545
// / A range for iterating the elements of an enum.
3548
3546
using ElementRange = DowncastFilterRange<EnumElementDecl, DeclRange>;
Original file line number Diff line number Diff line change @@ -4182,14 +4182,6 @@ EnumCaseDecl *EnumCaseDecl::create(SourceLoc CaseLoc,
4182
4182
return ::new (buf) EnumCaseDecl (CaseLoc, Elements, DC);
4183
4183
}
4184
4184
4185
- EnumElementDecl *EnumDecl::getElement (Identifier Name) const {
4186
- // FIXME: Linear search is not great for large enum decls.
4187
- for (EnumElementDecl *Elt : getAllElements ())
4188
- if (Elt->getName () == Name)
4189
- return Elt;
4190
- return nullptr ;
4191
- }
4192
-
4193
4185
bool EnumDecl::hasPotentiallyUnavailableCaseValue () const {
4194
4186
switch (static_cast <AssociatedValueCheck>(Bits.EnumDecl .HasAssociatedValues )) {
4195
4187
case AssociatedValueCheck::Unchecked:
You can’t perform that action at this time.
0 commit comments