[llvm] [ADT] Remove ArrayRef(std::nullopt_t) (PR #165831)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 30 23:16:42 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/165831
ArrayRef(std::nullopt_t) has been deprecated since:
commit 2529de5c935ad59e5f76d15890f857bf42817bc9
Author: Kazu Hirata <kazu at google.com>
Date: Fri Jun 27 01:03:02 2025 -0700
Note that we've made at lease one release, llvmorg-21.1, with this
deprecation.
>From c939b48e98948f3ca3c66b9ad7f15600507df9c6 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Thu, 30 Oct 2025 12:37:34 -0700
Subject: [PATCH] [ADT] Remove ArrayRef(std::nullopt_t)
ArrayRef(std::nullopt_t) has been deprecated since:
commit 2529de5c935ad59e5f76d15890f857bf42817bc9
Author: Kazu Hirata <kazu at google.com>
Date: Fri Jun 27 01:03:02 2025 -0700
Note that we've made at lease one release, llvmorg-21.1, with this
deprecation.
---
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 448d10013d371..450f4d04c97fc 100644
--- a/llvm/include/llvm/ADT/ArrayRef.h
+++ b/llvm/include/llvm/ADT/ArrayRef.h
@@ -66,10 +66,6 @@ namespace llvm {
/// Construct an empty ArrayRef.
/*implicit*/ ArrayRef() = default;
- /// Construct an empty ArrayRef from std::nullopt.
- /*implicit*/ LLVM_DEPRECATED("Use {} or ArrayRef<T>() instead", "{}")
- ArrayRef(std::nullopt_t) {}
-
/// Construct an ArrayRef from a single element.
/*implicit*/ ArrayRef(const T &OneElt LLVM_LIFETIME_BOUND)
: Data(&OneElt), Length(1) {}
More information about the llvm-commits
mailing list