diff --git a/clang/include/clang/AST/NSAPI.h b/clang/include/clang/AST/NSAPI.h --- a/clang/include/clang/AST/NSAPI.h +++ b/clang/include/clang/AST/NSAPI.h @@ -55,9 +55,6 @@ /// The Objective-C NSString selectors. Selector getNSStringSelector(NSStringMethodKind MK) const; - /// Return NSStringMethodKind if \param Sel is such a selector. - Optional getNSStringMethodKind(Selector Sel) const; - /// Returns true if the expression \param E is a reference of /// "NSUTF8StringEncoding" enum constant. bool isNSUTF8StringEncodingConstant(const Expr *E) const { diff --git a/clang/lib/AST/NSAPI.cpp b/clang/lib/AST/NSAPI.cpp --- a/clang/lib/AST/NSAPI.cpp +++ b/clang/lib/AST/NSAPI.cpp @@ -75,17 +75,6 @@ return NSStringSelectors[MK]; } -Optional -NSAPI::getNSStringMethodKind(Selector Sel) const { - for (unsigned i = 0; i != NumNSStringMethods; ++i) { - NSStringMethodKind MK = NSStringMethodKind(i); - if (Sel == getNSStringSelector(MK)) - return MK; - } - - return None; -} - Selector NSAPI::getNSArraySelector(NSArrayMethodKind MK) const { if (NSArraySelectors[MK].isNull()) { Selector Sel;