diff --git a/llvm/include/llvm/ADT/None.h b/llvm/include/llvm/ADT/None.h --- a/llvm/include/llvm/ADT/None.h +++ b/llvm/include/llvm/ADT/None.h @@ -16,11 +16,13 @@ #ifndef LLVM_ADT_NONE_H #define LLVM_ADT_NONE_H +#include + namespace llvm { /// A simple null object to allow implicit construction of Optional /// and similar types without having to spell out the specialization's name. -enum class NoneType { None }; -const NoneType None = NoneType::None; +using NoneType = std::nullopt_t; +inline constexpr std::nullopt_t None = std::nullopt; } #endif