[llvm] 90559ed - [ADT] Deperecate llvm::None
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 10 15:50:05 PST 2022
Author: Kazu Hirata
Date: 2022-12-10T15:49:59-08:00
New Revision: 90559ed6e650e1a7b8e8d13c84388b2debcbb4b9
URL: https://github.com/llvm/llvm-project/commit/90559ed6e650e1a7b8e8d13c84388b2debcbb4b9
DIFF: https://github.com/llvm/llvm-project/commit/90559ed6e650e1a7b8e8d13c84388b2debcbb4b9.diff
LOG: [ADT] Deperecate llvm::None
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
Added:
Modified:
llvm/include/llvm/ADT/None.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ADT/None.h b/llvm/include/llvm/ADT/None.h
index e64d0cb760ff..d55bd46dd89d 100644
--- a/llvm/include/llvm/ADT/None.h
+++ b/llvm/include/llvm/ADT/None.h
@@ -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;
}
More information about the llvm-commits
mailing list