[llvm] 20573d1 - [ADT] Remove is_splat

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 6 10:56:19 PDT 2022


Author: Jakub Kuderski
Date: 2022-09-06T13:49:26-04:00
New Revision: 20573d11b74e6535acb3229c4493b42c5d13e1dc

URL: https://github.com/llvm/llvm-project/commit/20573d11b74e6535acb3229c4493b42c5d13e1dc
DIFF: https://github.com/llvm/llvm-project/commit/20573d11b74e6535acb3229c4493b42c5d13e1dc.diff

LOG: [ADT] Remove is_splat

`is_splat` is superseded by `all_equal` and marked as deprecated.
See the discussion thread for more details:
https://discourse.llvm.org/t/adt-is-splat-and-empty-ranges/64692

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D132336

Added: 
    

Modified: 
    llvm/include/llvm/ADT/STLExtras.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h
index 88ec10e03ba05..17ec8480278f1 100644
--- a/llvm/include/llvm/ADT/STLExtras.h
+++ b/llvm/include/llvm/ADT/STLExtras.h
@@ -1791,24 +1791,6 @@ template <typename T> bool all_equal(std::initializer_list<T> Values) {
   return all_equal<std::initializer_list<T>>(std::move(Values));
 }
 
-/// Returns true if Range consists of the same value repeated multiple times.
-template <typename R>
-LLVM_DEPRECATED(
-    "Use 'all_equal(Range)' or '!empty(Range) && all_equal(Range)' instead.",
-    "all_equal")
-bool is_splat(R &&Range) {
-  return !llvm::empty(Range) && all_equal(Range);
-}
-
-/// Returns true if Values consists of the same value repeated multiple times.
-template <typename T>
-LLVM_DEPRECATED(
-    "Use 'all_equal(Values)' or '!empty(Values) && all_equal(Values)' instead.",
-    "all_equal")
-bool is_splat(std::initializer_list<T> Values) {
-  return is_splat<std::initializer_list<T>>(std::move(Values));
-}
-
 /// Provide a container algorithm similar to C++ Library Fundamentals v2's
 /// `erase_if` which is equivalent to:
 ///


        


More information about the llvm-commits mailing list