Skip to content

Commit e310db1

Browse files
authored
[NFC] Remove uses of deprecated StringRef::equals (#14198)
Uses have already been removed upstream and downstream, so remove the remaining ones here.
1 parent 3e474e0 commit e310db1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

clang/lib/CodeGen/CGCall.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1881,9 +1881,9 @@ static llvm::fp::FPAccuracy convertFPAccuracy(StringRef FPAccuracyStr) {
18811881
}
18821882

18831883
static int32_t convertFPAccuracyToAspect(StringRef FPAccuracyStr) {
1884-
assert(FPAccuracyStr.equals("high") || FPAccuracyStr.equals("medium") ||
1885-
FPAccuracyStr.equals("low") || FPAccuracyStr.equals("sycl") ||
1886-
FPAccuracyStr.equals("cuda"));
1884+
assert(FPAccuracyStr == "high" || FPAccuracyStr == "medium" ||
1885+
FPAccuracyStr == "low" || FPAccuracyStr == "sycl" ||
1886+
FPAccuracyStr == "cuda");
18871887
return llvm::StringSwitch<int32_t>(FPAccuracyStr)
18881888
.Case("high", SYCLInternalAspect::fp_intrinsic_accuracy_high)
18891889
.Case("medium", SYCLInternalAspect::fp_intrinsic_accuracy_medium)

clang/lib/Frontend/CompilerInvocation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3858,7 +3858,7 @@ void CompilerInvocation::ParseFpAccuracyArgs(LangOptions &Opts, ArgList &Args,
38583858
checkFPAccuracyIsValid(ValElement[0], Diags);
38593859
// No need to fill the map if the FPaccuracy is 'default'.
38603860
// The default builtin will be generated.
3861-
if (!ValElement[0].equals("default")) {
3861+
if (ValElement[0] != "default") {
38623862
// if FPAccuracyFuncMap of this function has been previously set
38633863
// update its value; the last fp-accuracy option in the command
38643864
// line wins.

llvm/include/llvm/SYCLLowerIR/CompileTimePropertiesPass.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ namespace detail {
5757
///
5858
/// @returns \c false if the value of \c Value equals to "false", \c true
5959
/// otherwise.
60-
inline bool toBool(StringRef Value) { return !Value.equals("false"); }
60+
inline bool toBool(StringRef Value) { return Value != "false"; }
6161

6262
} // namespace detail
6363

0 commit comments

Comments
 (0)