From 77dbea07356e1ab2f37a777d4d1ddc5dd3e301c2 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 3 Jan 2024 17:57:07 +0100 Subject: Vendor import of llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4. --- llvm/tools/llvm-diff/llvm-diff.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/tools/llvm-diff/llvm-diff.cpp') diff --git a/llvm/tools/llvm-diff/llvm-diff.cpp b/llvm/tools/llvm-diff/llvm-diff.cpp index 6fe18a51c9f5..3e77b1ed89b0 100644 --- a/llvm/tools/llvm-diff/llvm-diff.cpp +++ b/llvm/tools/llvm-diff/llvm-diff.cpp @@ -42,8 +42,7 @@ static std::unique_ptr 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); -- cgit v1.3