diff options
Diffstat (limited to 'contrib/llvm-project/llvm/tools')
| -rw-r--r-- | contrib/llvm-project/llvm/tools/llvm-ar/llvm-ar.cpp | 3 | ||||
| -rw-r--r-- | contrib/llvm-project/llvm/tools/llvm-diff/llvm-diff.cpp | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/contrib/llvm-project/llvm/tools/llvm-ar/llvm-ar.cpp b/contrib/llvm-project/llvm/tools/llvm-ar/llvm-ar.cpp index fcb6392a1d95..299b7856ec0b 100644 --- a/contrib/llvm-project/llvm/tools/llvm-ar/llvm-ar.cpp +++ b/contrib/llvm-project/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) { diff --git a/contrib/llvm-project/llvm/tools/llvm-diff/llvm-diff.cpp b/contrib/llvm-project/llvm/tools/llvm-diff/llvm-diff.cpp index 6fe18a51c9f5..3e77b1ed89b0 100644 --- a/contrib/llvm-project/llvm/tools/llvm-diff/llvm-diff.cpp +++ b/contrib/llvm-project/llvm/tools/llvm-diff/llvm-diff.cpp @@ -42,8 +42,7 @@ static std::unique_ptr<Module> readModule(LLVMContext &Context, static void diffGlobal(DifferenceEngine &Engine, Module &L, Module &R, StringRef Name) { // Drop leading sigils from the global name. - if (Name.starts_with("@")) - Name = Name.substr(1); + Name.consume_front("@"); Function *LFn = L.getFunction(Name); Function *RFn = R.getFunction(Name); |
