mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Address llvm::(Mutable)ArrayRef ctor deprecations
See: - https://github.com/llvm/llvm-project/pull/146113 - https://github.com/llvm/llvm-project/pull/146011
This commit is contained in:
@@ -3749,7 +3749,8 @@ public:
|
||||
return declOrOffset;
|
||||
|
||||
auto theStruct = MF.createDecl<StructDecl>(SourceLoc(), name, SourceLoc(),
|
||||
std::nullopt, genericParams, DC);
|
||||
ArrayRef<InheritedEntry>(),
|
||||
genericParams, DC);
|
||||
declOrOffset = theStruct;
|
||||
|
||||
// Read the generic environment.
|
||||
@@ -3898,8 +3899,9 @@ public:
|
||||
}
|
||||
|
||||
ctx.evaluator.cacheOutput(LifetimeDependenceInfoRequest{ctor},
|
||||
lifetimeDependencies.empty()? std::nullopt :
|
||||
ctx.AllocateCopy(lifetimeDependencies));
|
||||
lifetimeDependencies.empty()
|
||||
? ArrayRef<LifetimeDependenceInfo>()
|
||||
: ctx.AllocateCopy(lifetimeDependencies));
|
||||
|
||||
if (auto errorConvention = MF.maybeReadForeignErrorConvention())
|
||||
ctor->setForeignErrorConvention(*errorConvention);
|
||||
@@ -4502,7 +4504,8 @@ public:
|
||||
}
|
||||
|
||||
ctx.evaluator.cacheOutput(LifetimeDependenceInfoRequest{fn},
|
||||
lifetimeDependencies.empty() ? std::nullopt
|
||||
lifetimeDependencies.empty()
|
||||
? ArrayRef<LifetimeDependenceInfo>()
|
||||
: ctx.AllocateCopy(lifetimeDependencies));
|
||||
|
||||
if (auto errorConvention = MF.maybeReadForeignErrorConvention())
|
||||
@@ -4833,7 +4836,7 @@ public:
|
||||
|
||||
auto proto = MF.createDecl<ProtocolDecl>(
|
||||
DC, SourceLoc(), SourceLoc(), name,
|
||||
ArrayRef<PrimaryAssociatedTypeName>(), std::nullopt,
|
||||
ArrayRef<PrimaryAssociatedTypeName>(), ArrayRef<InheritedEntry>(),
|
||||
/*TrailingWhere=*/nullptr);
|
||||
declOrOffset = proto;
|
||||
|
||||
@@ -5059,9 +5062,9 @@ public:
|
||||
if (declOrOffset.isComplete())
|
||||
return declOrOffset;
|
||||
|
||||
auto theClass =
|
||||
MF.createDecl<ClassDecl>(SourceLoc(), name, SourceLoc(), std::nullopt,
|
||||
genericParams, DC, isExplicitActorDecl);
|
||||
auto theClass = MF.createDecl<ClassDecl>(
|
||||
SourceLoc(), name, SourceLoc(), ArrayRef<InheritedEntry>(),
|
||||
genericParams, DC, isExplicitActorDecl);
|
||||
declOrOffset = theClass;
|
||||
|
||||
theClass->setGenericSignature(MF.getGenericSignature(genericSigID));
|
||||
@@ -5142,8 +5145,9 @@ public:
|
||||
if (declOrOffset.isComplete())
|
||||
return declOrOffset;
|
||||
|
||||
auto theEnum = MF.createDecl<EnumDecl>(SourceLoc(), name, SourceLoc(),
|
||||
std::nullopt, genericParams, DC);
|
||||
auto theEnum =
|
||||
MF.createDecl<EnumDecl>(SourceLoc(), name, SourceLoc(),
|
||||
ArrayRef<InheritedEntry>(), genericParams, DC);
|
||||
|
||||
declOrOffset = theEnum;
|
||||
|
||||
@@ -5266,8 +5270,9 @@ public:
|
||||
}
|
||||
|
||||
ctx.evaluator.cacheOutput(LifetimeDependenceInfoRequest{elem},
|
||||
lifetimeDependencies.empty()? std::nullopt :
|
||||
ctx.AllocateCopy(lifetimeDependencies));
|
||||
lifetimeDependencies.empty()
|
||||
? ArrayRef<LifetimeDependenceInfo>()
|
||||
: ctx.AllocateCopy(lifetimeDependencies));
|
||||
|
||||
return elem;
|
||||
}
|
||||
@@ -7397,7 +7402,7 @@ detail::function_deserializer::deserialize(ModuleFile &MF,
|
||||
auto info = FunctionType::ExtInfoBuilder(
|
||||
*representation, noescape, throws, thrownError, *diffKind,
|
||||
clangFunctionType, isolation,
|
||||
/*LifetimeDependenceInfo */ std::nullopt, hasSendingResult)
|
||||
/*LifetimeDependenceInfo */ {}, hasSendingResult)
|
||||
.withSendable(sendable)
|
||||
.withAsync(async)
|
||||
.build();
|
||||
@@ -7965,7 +7970,7 @@ Expected<Type> DESERIALIZE_TYPE(SIL_FUNCTION_TYPE)(
|
||||
auto extInfo = SILFunctionType::ExtInfoBuilder(
|
||||
*representation, pseudogeneric, noescape, sendable, async,
|
||||
unimplementable, isolation, *diffKind, clangFunctionType,
|
||||
/*LifetimeDependenceInfo*/ std::nullopt)
|
||||
/*LifetimeDependenceInfo*/ {})
|
||||
.build();
|
||||
|
||||
// Process the coroutine kind.
|
||||
|
||||
Reference in New Issue
Block a user