-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[ADT] Remove makeArrayRef and makeMutableArrayRef #79719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kazutakahirata
merged 1 commit into
llvm:main
from
kazutakahirata:pr_cleanup_ArrayRef_remove_make
Jan 28, 2024
Merged
[ADT] Remove makeArrayRef and makeMutableArrayRef #79719
kazutakahirata
merged 1 commit into
llvm:main
from
kazutakahirata:pr_cleanup_ArrayRef_remove_make
Jan 28, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These have been deprecated since: commit 36117cc Author: serge-sans-paille <[email protected]> Date: Tue Jan 10 11:49:15 2023 +0100 commit c4b39cd Author: Joe Loser <[email protected]> Date: Mon Jan 16 14:52:16 2023 -0700
@llvm/pr-subscribers-llvm-adt Author: Kazu Hirata (kazutakahirata) ChangesThese have been deprecated since: commit 36117cc commit c4b39cd Full diff: https://github.com/llvm/llvm-project/pull/79719.diff 1 Files Affected:
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 <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
/// @{
|
MaskRay
approved these changes
Jan 28, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These have been deprecated since:
commit 36117cc
Author: serge-sans-paille [email protected]
Date: Tue Jan 10 11:49:15 2023 +0100
commit c4b39cd
Author: Joe Loser [email protected]
Date: Mon Jan 16 14:52:16 2023 -0700