[llvm] [ADT] Remove makeArrayRef and makeMutableArrayRef (PR #79719)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 27 17:23:09 PST 2024


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/79719

These have been deprecated since:

  commit 36117cc46388d677359f1180bd536f80d0c5fe97
  Author: serge-sans-paille <sguelton at mozilla.com>
  Date:   Tue Jan 10 11:49:15 2023 +0100

  commit c4b39cd09c4eeef2b3e3d32cb674f92c17eeb517
  Author: Joe Loser <joeloser at fastmail.com>
  Date:   Mon Jan 16 14:52:16 2023 -0700


>From 9ca5cc87aa63e369b3d7a04acf7e4aa1fbb1213a Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Tue, 12 Dec 2023 12:08:35 -0800
Subject: [PATCH] [ADT] Remove makeArrayRef and makeMutableArrayRef

These have been deprecated since:

  commit 36117cc46388d677359f1180bd536f80d0c5fe97
  Author: serge-sans-paille <sguelton at mozilla.com>
  Date:   Tue Jan 10 11:49:15 2023 +0100

  commit c4b39cd09c4eeef2b3e3d32cb674f92c17eeb517
  Author: Joe Loser <joeloser at fastmail.com>
  Date:   Mon Jan 16 14:52:16 2023 -0700
---
 llvm/include/llvm/ADT/ArrayRef.h | 130 -------------------------------
 1 file changed, 130 deletions(-)

diff --git a/llvm/include/llvm/ADT/ArrayRef.h b/llvm/include/llvm/ADT/ArrayRef.h
index 713f463f65edf17..ac40ec4a6b2404a 100644
--- a/llvm/include/llvm/ADT/ArrayRef.h
+++ b/llvm/include/llvm/ADT/ArrayRef.h
@@ -504,78 +504,6 @@ namespace llvm {
 
   /// @}
 
-  /// @name ArrayRef Convenience constructors
-  /// @{
-  /// Construct an ArrayRef from a single element.
-  template <typename T>
-  LLVM_DEPRECATED("Use deduction guide instead", "ArrayRef")
-  ArrayRef<T> makeArrayRef(const T &OneElt) {
-    return OneElt;
-  }
-
-  /// Construct an ArrayRef from a pointer and length.
-  template <typename T>
-  LLVM_DEPRECATED("Use deduction guide instead", "ArrayRef")
-  ArrayRef<T> makeArrayRef(const T *data, size_t length) {
-    return ArrayRef<T>(data, length);
-  }
-
-  /// Construct an ArrayRef from a range.
-  template <typename T>
-  LLVM_DEPRECATED("Use deduction guide instead", "ArrayRef")
-  ArrayRef<T> makeArrayRef(const T *begin, const T *end) {
-    return ArrayRef<T>(begin, end);
-  }
-
-  /// Construct an ArrayRef from a SmallVector.
-  template <typename T>
-  LLVM_DEPRECATED("Use deduction guide instead", "ArrayRef")
-  ArrayRef<T> makeArrayRef(const SmallVectorImpl<T> &Vec) {
-    return Vec;
-  }
-
-  /// Construct an ArrayRef from a SmallVector.
-  template <typename T, unsigned N>
-  LLVM_DEPRECATED("Use deduction guide instead", "ArrayRef")
-  ArrayRef<T> makeArrayRef(const SmallVector<T, N> &Vec) {
-    return Vec;
-  }
-
-  /// Construct an ArrayRef from a std::vector.
-  template <typename T>
-  LLVM_DEPRECATED("Use deduction guide instead", "ArrayRef")
-  ArrayRef<T> makeArrayRef(const std::vector<T> &Vec) {
-    return Vec;
-  }
-
-  /// Construct an ArrayRef from a std::array.
-  template <typename T, std::size_t N>
-  LLVM_DEPRECATED("Use deduction guide instead", "ArrayRef")
-  ArrayRef<T> makeArrayRef(const std::array<T, N> &Arr) {
-    return Arr;
-  }
-
-  /// Construct an ArrayRef from an ArrayRef (no-op) (const)
-  template <typename T>
-  LLVM_DEPRECATED("Use deduction guide instead", "ArrayRef")
-  ArrayRef<T> makeArrayRef(const ArrayRef<T> &Vec) {
-    return Vec;
-  }
-
-  /// Construct an ArrayRef from an ArrayRef (no-op)
-  template <typename T>
-  LLVM_DEPRECATED("Use deduction guide instead", "ArrayRef")
-  ArrayRef<T> &makeArrayRef(ArrayRef<T> &Vec) {
-    return Vec;
-  }
-
-  /// Construct an ArrayRef from a C array.
-  template <typename T, size_t N>
-  LLVM_DEPRECATED("Use deduction guide instead", "ArrayRef")
-  ArrayRef<T> makeArrayRef(const T (&Arr)[N]) {
-    return ArrayRef<T>(Arr);
-  }
-
   /// @name MutableArrayRef Deduction guides
   /// @{
   /// Deduction guide to construct a `MutableArrayRef` from a single element
@@ -604,64 +532,6 @@ namespace llvm {
   template <typename T, size_t N>
   MutableArrayRef(T (&Arr)[N]) -> MutableArrayRef<T>;
 
-  /// @}
-
-  /// Construct a MutableArrayRef from a single element.
-  template <typename T>
-  LLVM_DEPRECATED("Use deduction guide instead", "MutableArrayRef")
-  MutableArrayRef<T> makeMutableArrayRef(T &OneElt) {
-    return OneElt;
-  }
-
-  /// Construct a MutableArrayRef from a pointer and length.
-  template <typename T>
-  LLVM_DEPRECATED("Use deduction guide instead", "MutableArrayRef")
-  MutableArrayRef<T> makeMutableArrayRef(T *data, size_t length) {
-    return MutableArrayRef<T>(data, length);
-  }
-
-  /// Construct a MutableArrayRef from a SmallVector.
-  template <typename T>
-  LLVM_DEPRECATED("Use deduction guide instead", "MutableArrayRef")
-  MutableArrayRef<T> makeMutableArrayRef(SmallVectorImpl<T> &Vec) {
-    return Vec;
-  }
-
-  /// Construct a MutableArrayRef from a SmallVector.
-  template <typename T, unsigned N>
-  LLVM_DEPRECATED("Use deduction guide instead", "MutableArrayRef")
-  MutableArrayRef<T> makeMutableArrayRef(SmallVector<T, N> &Vec) {
-    return Vec;
-  }
-
-  /// Construct a MutableArrayRef from a std::vector.
-  template <typename T>
-  LLVM_DEPRECATED("Use deduction guide instead", "MutableArrayRef")
-  MutableArrayRef<T> makeMutableArrayRef(std::vector<T> &Vec) {
-    return Vec;
-  }
-
-  /// Construct a MutableArrayRef from a std::array.
-  template <typename T, std::size_t N>
-  LLVM_DEPRECATED("Use deduction guide instead", "MutableArrayRef")
-  MutableArrayRef<T> makeMutableArrayRef(std::array<T, N> &Arr) {
-    return Arr;
-  }
-
-  /// Construct a MutableArrayRef from a MutableArrayRef (no-op) (const)
-  template <typename T>
-  LLVM_DEPRECATED("Use deduction guide instead", "MutableArrayRef")
-  MutableArrayRef<T> makeMutableArrayRef(const MutableArrayRef<T> &Vec) {
-    return Vec;
-  }
-
-  /// Construct a MutableArrayRef from a C array.
-  template <typename T, size_t N>
-  LLVM_DEPRECATED("Use deduction guide instead", "MutableArrayRef")
-  MutableArrayRef<T> makeMutableArrayRef(T (&Arr)[N]) {
-    return MutableArrayRef<T>(Arr);
-  }
-
   /// @}
   /// @name ArrayRef Comparison Operators
   /// @{



More information about the llvm-commits mailing list