[llvm] 752e651 - [ADT] Remove llvm::empty

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 20 12:06:24 PST 2022


Author: Kazu Hirata
Date: 2022-11-20T12:06:19-08:00
New Revision: 752e6510292490b968968a26a31a5f2e1a9fa503

URL: https://github.com/llvm/llvm-project/commit/752e6510292490b968968a26a31a5f2e1a9fa503
DIFF: https://github.com/llvm/llvm-project/commit/752e6510292490b968968a26a31a5f2e1a9fa503.diff

LOG: [ADT] Remove llvm::empty

Note that I deprecated llvm::empty on September 18, 2022 in commit
6b49f30fca04ea3e4d57aef40e4bb6716a378870.

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 3a89b3f30bbd..669c1293d0f4 100644
--- a/llvm/include/llvm/ADT/STLExtras.h
+++ b/llvm/include/llvm/ADT/STLExtras.h
@@ -376,13 +376,6 @@ void adl_swap(T &&lhs, T &&rhs) noexcept(
   adl_detail::adl_swap(std::forward<T>(lhs), std::forward<T>(rhs));
 }
 
-/// Test whether \p RangeOrContainer is empty. Similar to C++17 std::empty.
-template <typename T>
-LLVM_DEPRECATED("Use x.empty() instead", "empty")
-constexpr bool empty(const T &RangeOrContainer) {
-  return adl_begin(RangeOrContainer) == adl_end(RangeOrContainer);
-}
-
 /// Returns true if the given container only contains a single element.
 template <typename ContainerTy> bool hasSingleElement(ContainerTy &&C) {
   auto B = std::begin(C), E = std::end(C);


        


More information about the llvm-commits mailing list