From 6c3ea866e93003e16fc55d3b5cedd3bc371d1fde Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 12 May 2023 15:37:37 -0700 Subject: [llvm] Migrate {starts,ends}with_insensitive to {starts,ends}_with_insensitive (NFC) This patch migrates uses of StringRef::{starts,ends}with_insensitive to StringRef::{starts,ends}_with_insensitive so that we can use names similar to those used in std::string_view. I'm planning to deprecate StringRef::{starts,ends}with_insensitive once the migration is complete across the code base. Differential Revision: https://reviews.llvm.org/D150426 --- llvm/tools/llvm-jitlink/llvm-jitlink.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'llvm/tools/llvm-jitlink/llvm-jitlink.cpp') diff --git a/llvm/tools/llvm-jitlink/llvm-jitlink.cpp b/llvm/tools/llvm-jitlink/llvm-jitlink.cpp index 332e3e7..4aa08f7 100644 --- a/llvm/tools/llvm-jitlink/llvm-jitlink.cpp +++ b/llvm/tools/llvm-jitlink/llvm-jitlink.cpp @@ -554,12 +554,12 @@ Expected getSlabAllocSize(StringRef SizeString) { uint64_t Units = 1024; - if (SizeString.endswith_insensitive("kb")) + if (SizeString.ends_with_insensitive("kb")) SizeString = SizeString.drop_back(2).rtrim(); - else if (SizeString.endswith_insensitive("mb")) { + else if (SizeString.ends_with_insensitive("mb")) { Units = 1024 * 1024; SizeString = SizeString.drop_back(2).rtrim(); - } else if (SizeString.endswith_insensitive("gb")) { + } else if (SizeString.ends_with_insensitive("gb")) { Units = 1024 * 1024 * 1024; SizeString = SizeString.drop_back(2).rtrim(); } @@ -1008,7 +1008,7 @@ Session::Session(std::unique_ptr EPC, Error &Err) } } else if (TT.isOSBinFormatCOFF() && !OrcRuntime.empty()) { auto LoadDynLibrary = [&, this](JITDylib &JD, StringRef DLLName) -> Error { - if (!DLLName.endswith_insensitive(".dll")) + if (!DLLName.ends_with_insensitive(".dll")) return make_error("DLLName not ending with .dll", inconvertibleErrorCode()); return loadAndLinkDynamicLibrary(JD, DLLName); @@ -1648,7 +1648,7 @@ static Error addLibraries(Session &S, for (auto FileName : (*G)->getImportedDynamicLibraries()) { LibraryLoad NewLL; auto FileNameRef = StringRef(FileName); - if (!FileNameRef.endswith_insensitive(".dll")) + if (!FileNameRef.ends_with_insensitive(".dll")) return make_error( "COFF Imported library not ending with dll extension?", inconvertibleErrorCode()); -- cgit v1.1