[llvm] [ADT] Remove MutableArrayRef(std::nullopt_t) (NFC) (PR #150471)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 24 10:14:24 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/150471
MutableArrayRef(std::nullopt_t) has been deprecated since:
commit 9d6cbc3c20923759d9ffdf19b4f0d498f8cf5584
Author: Kazu Hirata <kazu at google.com>
Date: Fri Jun 27 11:31:11 2025 -0700
I've never seen a use outside the LLVM project AFAICT, so this patch
just removes it ahead of ArrayRef(std::nullopt_t) to prevent
backsliding.
>From c932deb58fe77f4a48ca3304da54215641fe5b7c Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Fri, 18 Jul 2025 08:12:38 -0700
Subject: [PATCH] [ADT] Remove MutableArrayRef(std::nullopt_t) (NFC)
MutableArrayRef(std::nullopt_t) has been deprecated since:
commit 9d6cbc3c20923759d9ffdf19b4f0d498f8cf5584
Author: Kazu Hirata <kazu at google.com>
Date: Fri Jun 27 11:31:11 2025 -0700
I've never seen a use outside the LLVM project AFAICT, so this patch
just removes it ahead of ArrayRef(std::nullopt_t) to prevent
backsliding.
---
llvm/include/llvm/ADT/ArrayRef.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/llvm/include/llvm/ADT/ArrayRef.h b/llvm/include/llvm/ADT/ArrayRef.h
index ff8bdb8b4fec4..fb91690bb0eb3 100644
--- a/llvm/include/llvm/ADT/ArrayRef.h
+++ b/llvm/include/llvm/ADT/ArrayRef.h
@@ -317,10 +317,6 @@ namespace llvm {
/// Construct an empty MutableArrayRef.
/*implicit*/ MutableArrayRef() = default;
- /// Construct an empty MutableArrayRef from std::nullopt.
- /*implicit*/ LLVM_DEPRECATED("Use {} or MutableArrayRef<T>() instead", "{}")
- MutableArrayRef(std::nullopt_t) : ArrayRef<T>() {}
-
/// Construct a MutableArrayRef from a single element.
/*implicit*/ MutableArrayRef(T &OneElt) : ArrayRef<T>(OneElt) {}
More information about the llvm-commits
mailing list