summaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-ar/llvm-ar.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2024-01-03 16:57:07 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-01-03 16:57:07 +0000
commit77dbea07356e1ab2f37a777d4d1ddc5dd3e301c2 (patch)
treebdb0bc8db7a91e1f8b4bb8729fc391e2adf45380 /llvm/tools/llvm-ar/llvm-ar.cpp
parent99aabd70801bd4bc72c4942747f6d62c675112f5 (diff)
Vendor import of llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4.vendor/llvm-project/llvmorg-18-init-16003-gfc5f51cf5af4
Diffstat (limited to 'llvm/tools/llvm-ar/llvm-ar.cpp')
-rw-r--r--llvm/tools/llvm-ar/llvm-ar.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/tools/llvm-ar/llvm-ar.cpp b/llvm/tools/llvm-ar/llvm-ar.cpp
index fcb6392a1d95..299b7856ec0b 100644
--- a/llvm/tools/llvm-ar/llvm-ar.cpp
+++ b/llvm/tools/llvm-ar/llvm-ar.cpp
@@ -1287,8 +1287,7 @@ static const char *matchFlagWithArg(StringRef Expected,
ArrayRef<const char *> Args) {
StringRef Arg = *ArgIt;
- if (Arg.starts_with("--"))
- Arg = Arg.substr(2);
+ Arg.consume_front("--");
size_t len = Expected.size();
if (Arg == Expected) {