Replace usages of StringRef.find(Key) != StringRef::npos to StringRef.contains(Key)

This commit is contained in:
Minhyuk Kim
2020-12-29 00:09:16 +09:00
parent 187f4dbaf8
commit e924cf6104
19 changed files with 31 additions and 41 deletions

View File

@@ -1163,7 +1163,7 @@ llvm::SmallString<32> getTargetDependentLibraryOption(const llvm::Triple &T,
llvm::SmallString<32> buffer;
if (T.isWindowsMSVCEnvironment() || T.isWindowsItaniumEnvironment()) {
bool quote = library.find(' ') != StringRef::npos;
bool quote = library.contains(' ');
buffer += "/DEFAULTLIB:";
if (quote)
@@ -1174,7 +1174,7 @@ llvm::SmallString<32> getTargetDependentLibraryOption(const llvm::Triple &T,
if (quote)
buffer += '"';
} else if (T.isPS4()) {
bool quote = library.find(' ') != StringRef::npos;
bool quote = library.contains(' ');
buffer += "\01";
if (quote)