[llvm] 9b6f073 - [Support] Drop nop conversions of StringRef to StringRef (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri May 17 07:31:04 PDT 2024
Author: Kazu Hirata
Date: 2024-05-17T07:30:58-07:00
New Revision: 9b6f0735fbff4e9a51f0c76f5630be649490f6ef
URL: https://github.com/llvm/llvm-project/commit/9b6f0735fbff4e9a51f0c76f5630be649490f6ef
DIFF: https://github.com/llvm/llvm-project/commit/9b6f0735fbff4e9a51f0c76f5630be649490f6ef.diff
LOG: [Support] Drop nop conversions of StringRef to StringRef (NFC)
Both sides here are known to be of StringRef.
Added:
Modified:
llvm/lib/Support/CommandLine.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index 056340bbab5ae..8a00d4798f33d 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -534,7 +534,7 @@ SubCommand *CommandLineParser::LookupSubCommand(StringRef Name,
if (S->getName().empty())
continue;
- if (StringRef(S->getName()) == StringRef(Name))
+ if (S->getName() == Name)
return S;
if (!NearestMatch && S->getName().edit_distance(Name) < 2)
More information about the llvm-commits
mailing list