aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/dsymutil
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2024-05-08 10:33:53 -0700
committerGitHub <noreply@github.com>2024-05-08 10:33:53 -0700
commitbb6df0804ba0a0b0581aec4156138f5144dbcee2 (patch)
tree9f1bf9618fd27b9941c88b59f5790dc9049eda7f /llvm/tools/dsymutil
parent46435ac19e09039fb146fa6c12da0e640a66d435 (diff)
downloadllvm-bb6df0804ba0a0b0581aec4156138f5144dbcee2.zip
llvm-bb6df0804ba0a0b0581aec4156138f5144dbcee2.tar.gz
llvm-bb6df0804ba0a0b0581aec4156138f5144dbcee2.tar.bz2
[llvm] Use StringRef::operator== instead of StringRef::equals (NFC) (#91441)
I'm planning to remove StringRef::equals in favor of StringRef::operator==. - StringRef::operator==/!= outnumber StringRef::equals by a factor of 70 under llvm/ in terms of their usage. - The elimination of StringRef::equals brings StringRef closer to std::string_view, which has operator== but not equals. - S == "foo" is more readable than S.equals("foo"), especially for !Long.Expression.equals("str") vs Long.Expression != "str".
Diffstat (limited to 'llvm/tools/dsymutil')
-rw-r--r--llvm/tools/dsymutil/DwarfLinkerForBinary.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/dsymutil/DwarfLinkerForBinary.cpp b/llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
index 7246ba4..8347370 100644
--- a/llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
+++ b/llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
@@ -705,7 +705,7 @@ bool DwarfLinkerForBinary::linkImpl(
} else {
// Try and emit more helpful warnings by applying some heuristics.
StringRef ObjFile = ContainerName;
- bool IsClangModule = sys::path::extension(Path).equals(".pcm");
+ bool IsClangModule = sys::path::extension(Path) == ".pcm";
bool IsArchive = ObjFile.ends_with(")");
if (IsClangModule) {