[llvm] a0b97a4 - [ADT] Remove Optional<T>::create

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 14 10:34:39 PST 2022


Author: Kazu Hirata
Date: 2022-12-14T10:34:34-08:00
New Revision: a0b97a42472497bc07e0a8e00ef64913283e7691

URL: https://github.com/llvm/llvm-project/commit/a0b97a42472497bc07e0a8e00ef64913283e7691
DIFF: https://github.com/llvm/llvm-project/commit/a0b97a42472497bc07e0a8e00ef64913283e7691.diff

LOG: [ADT] Remove Optional<T>::create

The last use of Optional<T>::create was removed on December 10, 2022
in commit 1cb7fba3e57d6c31f05c7a2bda1634da49dd1d18.

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

Added: 
    

Modified: 
    llvm/include/llvm/ADT/Optional.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/Optional.h b/llvm/include/llvm/ADT/Optional.h
index 5574382f22b68..670273868ebba 100644
--- a/llvm/include/llvm/ADT/Optional.h
+++ b/llvm/include/llvm/ADT/Optional.h
@@ -258,10 +258,6 @@ template <typename T> class Optional {
     Storage.emplace(std::forward<ArgTypes>(Args)...);
   }
 
-  static constexpr Optional create(const T *y) {
-    return y ? Optional(*y) : Optional();
-  }
-
   Optional &operator=(const T &y) {
     Storage = y;
     return *this;


        


More information about the llvm-commits mailing list