mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
llvm::StringRef equals_lower -> equals_insensitive
The `equals_lower` API was replaced with `equals_insensitive` in llvm
commit 2e4a2b8430aca6f7aef8100a5ff81ca0328d03f9 and
3eed57e7ef7da5eda765ccc19fd26fb8dfcd8d41.
Ran git clang-format.
(cherry picked from commit e21e70a6bf)
This commit is contained in:
@@ -45,8 +45,8 @@ bool swift::canBeMemberName(StringRef identifier) {
|
||||
}
|
||||
|
||||
bool swift::isPreposition(StringRef word) {
|
||||
#define PREPOSITION(Word) \
|
||||
if (word.equals_lower(#Word)) \
|
||||
#define PREPOSITION(Word) \
|
||||
if (word.equals_insensitive(#Word)) \
|
||||
return true;
|
||||
#include "PartsOfSpeech.def"
|
||||
|
||||
@@ -55,11 +55,11 @@ bool swift::isPreposition(StringRef word) {
|
||||
|
||||
PartOfSpeech swift::getPartOfSpeech(StringRef word) {
|
||||
// FIXME: This implementation is woefully inefficient.
|
||||
#define PREPOSITION(Word) \
|
||||
if (word.equals_lower(#Word)) \
|
||||
#define PREPOSITION(Word) \
|
||||
if (word.equals_insensitive(#Word)) \
|
||||
return PartOfSpeech::Preposition;
|
||||
#define VERB(Word) \
|
||||
if (word.equals_lower(#Word)) \
|
||||
#define VERB(Word) \
|
||||
if (word.equals_insensitive(#Word)) \
|
||||
return PartOfSpeech::Verb;
|
||||
#include "PartsOfSpeech.def"
|
||||
|
||||
@@ -417,7 +417,7 @@ static bool matchNameWordToTypeWord(StringRef nameWord, StringRef typeWord) {
|
||||
}
|
||||
|
||||
// Check for an exact match.
|
||||
return nameWord.equals_lower(typeWord);
|
||||
return nameWord.equals_insensitive(typeWord);
|
||||
}
|
||||
|
||||
/// Match the beginning of the name to the given type name.
|
||||
|
||||
Reference in New Issue
Block a user