================
@@ -131,6 +135,12 @@ std::string GetExecutablePath(const char *Argv0, void 
*MainAddr) {
   return llvm::sys::fs::getMainExecutable(Argv0, MainAddr);
 }
 
+inline bool ends_with(std::string const & value, std::string const & ending)
+{
+    if (ending.size() > value.size()) return false;
+    return std::equal(ending.rbegin(), ending.rend(), value.rbegin());
+}
+
----------------
ilovepi wrote:

`ends_with` is a c++20 feature. I believe LLVM is still on C++17 
(https://www.llvm.org/docs/CodingStandards.html#c-standard-versions), you can't 
use the one from the STL, but `SmallString` does, 
https://llvm.org/doxygen/classllvm_1_1SmallString.html#a6f1b0c312b24ebd6db62d9612a466f46.

https://github.com/llvm/llvm-project/pull/93928
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to