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