Migrate llvm::Optional to std::optional

LLVM has removed llvm::Optional, move over to std::optional. Also
clang-format to fix up all the renamed #includes.
This commit is contained in:
Ben Barham
2024-02-02 22:19:39 -08:00
parent d3d4bd203c
commit ef8825bfe6
810 changed files with 8035 additions and 8718 deletions

View File

@@ -16,7 +16,7 @@
#include "swift/Basic/LLVM.h"
#include "swift/Basic/OptionSet.h"
#include "llvm/ADT/Optional.h"
#include <optional>
#include <string>
#include <vector>
@@ -50,7 +50,7 @@ using ModuleTraversalOptions = OptionSet<ModuleTraversal>;
void collectModuleGroups(ModuleDecl *M, SmallVectorImpl<StringRef> &Into);
llvm::Optional<StringRef> findGroupNameForUSR(ModuleDecl *M, StringRef USR);
std::optional<StringRef> findGroupNameForUSR(ModuleDecl *M, StringRef USR);
bool printTypeInterface(ModuleDecl *M, Type Ty, ASTPrinter &Printer,
std::string &TypeName, std::string &Error);