Skip to content

Commit c7b51ed

Browse files
Merge pull request swiftlang#83204 from swiftlang/jepa-main
Address rebranch deprecations
2 parents 5664fd6 + ed1d70f commit c7b51ed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+568
-879
lines changed

include/swift/AST/ExtInfo.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -549,15 +549,15 @@ class ASTExtInfoBuilder {
549549
: ASTExtInfoBuilder(Representation::Swift, false, false, Type(),
550550
DifferentiabilityKind::NonDifferentiable, nullptr,
551551
FunctionTypeIsolation::forNonIsolated(),
552-
std::nullopt /* LifetimeDependenceInfo */,
552+
{} /* LifetimeDependenceInfo */,
553553
false /*sendingResult*/) {}
554554

555555
// Constructor for polymorphic type.
556556
ASTExtInfoBuilder(Representation rep, bool throws, Type thrownError)
557557
: ASTExtInfoBuilder(rep, false, throws, thrownError,
558558
DifferentiabilityKind::NonDifferentiable, nullptr,
559559
FunctionTypeIsolation::forNonIsolated(),
560-
std::nullopt /* LifetimeDependenceInfo */,
560+
{} /* LifetimeDependenceInfo */,
561561
false /*sendingResult*/) {}
562562

563563
// Constructor with no defaults.
@@ -1047,7 +1047,7 @@ class SILExtInfoBuilder {
10471047
makeBits(SILFunctionTypeRepresentation::Thick, false, false, false,
10481048
false, false, SILFunctionTypeIsolation::forUnknown(),
10491049
DifferentiabilityKind::NonDifferentiable),
1050-
ClangTypeInfo(nullptr), /*LifetimeDependenceInfo*/ std::nullopt) {}
1050+
ClangTypeInfo(nullptr), /*LifetimeDependenceInfo*/ {}) {}
10511051

10521052
SILExtInfoBuilder(Representation rep, bool isPseudogeneric, bool isNoEscape,
10531053
bool isSendable, bool isAsync, bool isUnimplementable,

include/swift/AST/Types.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4018,7 +4018,7 @@ class FunctionType final
40184018

40194019
ArrayRef<LifetimeDependenceInfo> getLifetimeDependencies() const {
40204020
if (!hasLifetimeDependencies())
4021-
return std::nullopt;
4021+
return {};
40224022
return {getTrailingObjects<LifetimeDependenceInfo>(),
40234023
getNumLifetimeDependencies()};
40244024
}
@@ -4188,7 +4188,7 @@ class GenericFunctionType final
41884188

41894189
ArrayRef<LifetimeDependenceInfo> getLifetimeDependencies() const {
41904190
if (!hasLifetimeDependencies())
4191-
return std::nullopt;
4191+
return {};
41924192
return {getTrailingObjects<LifetimeDependenceInfo>(),
41934193
getNumLifetimeDependencies()};
41944194
}
@@ -5680,7 +5680,7 @@ class SILFunctionType final
56805680
// relative to the original FunctionType.
56815681
ArrayRef<LifetimeDependenceInfo> getLifetimeDependencies() const {
56825682
if (!hasLifetimeDependencies())
5683-
return std::nullopt;
5683+
return {};
56845684
return {getTrailingObjects<LifetimeDependenceInfo>(),
56855685
NumLifetimeDependencies};
56865686
}

include/swift/Basic/TaskQueue.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ class TaskQueue {
205205
/// \param Context an optional context which will be associated with the task
206206
/// \param SeparateErrors Controls whether error output is reported separately
207207
virtual void addTask(const char *ExecPath, ArrayRef<const char *> Args,
208-
ArrayRef<const char *> Env = std::nullopt,
209-
void *Context = nullptr, bool SeparateErrors = false);
208+
ArrayRef<const char *> Env = {}, void *Context = nullptr,
209+
bool SeparateErrors = false);
210210

211211
/// Synchronously executes the tasks in the TaskQueue.
212212
///
@@ -240,8 +240,8 @@ class DummyTaskQueue : public TaskQueue {
240240
bool SeparateErrors;
241241

242242
DummyTask(const char *ExecPath, ArrayRef<const char *> Args,
243-
ArrayRef<const char *> Env = std::nullopt,
244-
void *Context = nullptr, bool SeparateErrors = false)
243+
ArrayRef<const char *> Env = {}, void *Context = nullptr,
244+
bool SeparateErrors = false)
245245
: ExecPath(ExecPath), Args(Args), Env(Env), Context(Context),
246246
SeparateErrors(SeparateErrors) {}
247247
};
@@ -254,8 +254,8 @@ class DummyTaskQueue : public TaskQueue {
254254
virtual ~DummyTaskQueue();
255255

256256
void addTask(const char *ExecPath, ArrayRef<const char *> Args,
257-
ArrayRef<const char *> Env = std::nullopt,
258-
void *Context = nullptr, bool SeparateErrors = false) override;
257+
ArrayRef<const char *> Env = {}, void *Context = nullptr,
258+
bool SeparateErrors = false) override;
259259

260260
bool
261261
execute(TaskBeganCallback Began = TaskBeganCallback(),

include/swift/Driver/Action.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class CompileJobAction : public JobAction {
134134

135135
public:
136136
CompileJobAction(file_types::ID OutputType)
137-
: JobAction(Action::Kind::CompileJob, std::nullopt, OutputType) {}
137+
: JobAction(Action::Kind::CompileJob, {}, OutputType) {}
138138
CompileJobAction(Action *Input, file_types::ID OutputType)
139139
: JobAction(Action::Kind::CompileJob, Input, OutputType) {}
140140

@@ -169,8 +169,7 @@ class InterpretJobAction : public JobAction {
169169

170170
public:
171171
explicit InterpretJobAction()
172-
: JobAction(Action::Kind::InterpretJob, std::nullopt,
173-
file_types::TY_Nothing) {}
172+
: JobAction(Action::Kind::InterpretJob, {}, file_types::TY_Nothing) {}
174173

175174
static bool classof(const Action *A) {
176175
return A->getKind() == Action::Kind::InterpretJob;
@@ -209,7 +208,7 @@ class REPLJobAction : public JobAction {
209208
Mode RequestedMode;
210209
public:
211210
REPLJobAction(Mode mode)
212-
: JobAction(Action::Kind::REPLJob, std::nullopt, file_types::TY_Nothing),
211+
: JobAction(Action::Kind::REPLJob, {}, file_types::TY_Nothing),
213212
RequestedMode(mode) {}
214213

215214
Mode getRequestedMode() const { return RequestedMode; }

0 commit comments

Comments
 (0)