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

@@ -432,8 +432,7 @@ class InheritedProtocolCollector {
/// Helper to extract the `@available` attributes on a decl.
static AvailableAttrList
getAvailabilityAttrs(const Decl *D,
llvm::Optional<AvailableAttrList> &cache) {
getAvailabilityAttrs(const Decl *D, std::optional<AvailableAttrList> &cache) {
if (cache.has_value())
return cache.value();
@@ -488,7 +487,7 @@ class InheritedProtocolCollector {
/// protocols.
void recordProtocols(InheritedTypes directlyInherited, const Decl *D,
bool skipExtra = false) {
llvm::Optional<AvailableAttrList> availableAttrs;
std::optional<AvailableAttrList> availableAttrs;
for (int i : directlyInherited.getIndices()) {
Type inheritedTy = directlyInherited.getResolvedType(i);