[PATCH] D138623: [ADT] Deprecate llvm::NoneType

Kazu Hirata via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 23 16:33:24 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbd6a17069da6: [ADT] Deprecate llvm::NoneType (authored by kazu).

Changed prior to commit:
  https://reviews.llvm.org/D138623?vs=477633&id=477652#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138623/new/

https://reviews.llvm.org/D138623

Files:
  llvm/include/llvm/ADT/None.h


Index: llvm/include/llvm/ADT/None.h
===================================================================
--- llvm/include/llvm/ADT/None.h
+++ llvm/include/llvm/ADT/None.h
@@ -16,12 +16,14 @@
 #ifndef LLVM_ADT_NONE_H
 #define LLVM_ADT_NONE_H
 
+#include "llvm/Support/Compiler.h"
 #include <optional>
 
 namespace llvm {
 /// A simple null object to allow implicit construction of Optional<T>
 /// and similar types without having to spell out the specialization's name.
-using NoneType = std::nullopt_t;
+LLVM_DEPRECATED("Use std::nullopt_t instead", "std::nullopt_t")
+typedef std::nullopt_t NoneType;
 inline constexpr std::nullopt_t None = std::nullopt;
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138623.477652.patch
Type: text/x-patch
Size: 661 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221124/257a8e93/attachment.bin>


More information about the llvm-commits mailing list