[ADT] Deperecate llvm::None
authorKazu Hirata <kazu@google.com>
Sat, 10 Dec 2022 23:49:58 +0000 (15:49 -0800)
committerKazu Hirata <kazu@google.com>
Sat, 10 Dec 2022 23:49:59 +0000 (15:49 -0800)
I've converted all known uses of None to std::nullopt.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

Differential Revision: https://reviews.llvm.org/D139763

llvm/include/llvm/ADT/None.h

index e64d0cb..d55bd46 100644 (file)
@@ -24,6 +24,7 @@ namespace llvm {
 /// and similar types without having to spell out the specialization's name.
 LLVM_DEPRECATED("Use std::nullopt_t instead", "std::nullopt_t")
 typedef std::nullopt_t NoneType;
+LLVM_DEPRECATED("Use std::nullopt instead.", "std::nullopt")
 inline constexpr std::nullopt_t None = std::nullopt;
 }