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:
Evan Wilde
2021-06-30 10:49:16 -07:00
committed by Eric Miotto
parent 0919c2cd70
commit 42ff140171
6 changed files with 15 additions and 14 deletions

View File

@@ -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.