kazu created this revision.
Herald added a project: All.
kazu requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142857

Files:
  clang/include/clang/Basic/LLVM.h


Index: clang/include/clang/Basic/LLVM.h
===================================================================
--- clang/include/clang/Basic/LLVM.h
+++ clang/include/clang/Basic/LLVM.h
@@ -19,9 +19,6 @@
 // dependencies.
 // Casting.h has complex templates that cannot be easily forward declared.
 #include "llvm/Support/Casting.h"
-// None.h includes an enumerator that is desired & cannot be forward declared
-// without a definition of NoneType.
-#include "llvm/ADT/None.h"
 // Add this header as a workaround to prevent `too few template arguments for
 // class template 'SmallVector'` building error with build compilers like XL.
 #include "llvm/ADT/SmallVector.h"
@@ -37,7 +34,6 @@
   template<unsigned InternalLen> class SmallString;
   template<typename T, unsigned N> class SmallVector;
   template<typename T> class SmallVectorImpl;
-  template <typename T> using Optional = std::optional<T>;
   template <class T> class Expected;
 
   template<typename T>
@@ -69,7 +65,6 @@
   // ADT's.
   using llvm::ArrayRef;
   using llvm::MutableArrayRef;
-  using llvm::Optional;
   using llvm::OwningArrayRef;
   using llvm::SaveAndRestore;
   using llvm::SmallString;


Index: clang/include/clang/Basic/LLVM.h
===================================================================
--- clang/include/clang/Basic/LLVM.h
+++ clang/include/clang/Basic/LLVM.h
@@ -19,9 +19,6 @@
 // dependencies.
 // Casting.h has complex templates that cannot be easily forward declared.
 #include "llvm/Support/Casting.h"
-// None.h includes an enumerator that is desired & cannot be forward declared
-// without a definition of NoneType.
-#include "llvm/ADT/None.h"
 // Add this header as a workaround to prevent `too few template arguments for
 // class template 'SmallVector'` building error with build compilers like XL.
 #include "llvm/ADT/SmallVector.h"
@@ -37,7 +34,6 @@
   template<unsigned InternalLen> class SmallString;
   template<typename T, unsigned N> class SmallVector;
   template<typename T> class SmallVectorImpl;
-  template <typename T> using Optional = std::optional<T>;
   template <class T> class Expected;
 
   template<typename T>
@@ -69,7 +65,6 @@
   // ADT's.
   using llvm::ArrayRef;
   using llvm::MutableArrayRef;
-  using llvm::Optional;
   using llvm::OwningArrayRef;
   using llvm::SaveAndRestore;
   using llvm::SmallString;
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to