diff options
author | Kazu Hirata <kazu@google.com> | 2024-01-31 23:54:07 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2024-01-31 23:54:07 -0800 |
commit | 39fa304866e16f1408a0cab9437e47e4ebacf206 (patch) | |
tree | 371c2aaa830ce6efdbc6e2e101ecb149aa0cfe73 /llvm/lib/Support/CommandLine.cpp | |
parent | e8512786fedbfa6ddba70ceddc29d7122173ba5e (diff) | |
download | llvm-39fa304866e16f1408a0cab9437e47e4ebacf206.zip llvm-39fa304866e16f1408a0cab9437e47e4ebacf206.tar.gz llvm-39fa304866e16f1408a0cab9437e47e4ebacf206.tar.bz2 |
[llvm] Use StringRef::starts_with (NFC)
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r-- | llvm/lib/Support/CommandLine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index cb9eb91..c076ae8 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/lib/Support/CommandLine.cpp @@ -422,7 +422,7 @@ void Option::removeArgument() { GlobalParser->removeOption(this); } void Option::setArgStr(StringRef S) { if (FullyInitialized) GlobalParser->updateArgStr(this, S); - assert((S.empty() || S[0] != '-') && "Option can't start with '-"); + assert(!S.starts_with("-") && "Option can't start with '-"); ArgStr = S; if (ArgStr.size() == 1) setMiscFlag(Grouping); |