Skip to content

Commit 44f1806

Browse files
author
Harlan Haskins
committed
Turn on -enable-operator-designated-types for the standard library
Because this feature mostly exists for the standard library, turn it on specifically. This avoids having to serialize it in the flags necessary for parseable interfaces.
1 parent 38e0f38 commit 44f1806

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/Frontend/CompilerInvocation.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
212212
Opts.EnableOperatorDesignatedTypes |=
213213
Args.hasArg(OPT_enable_operator_designated_types);
214214

215+
// Always enable operator designated types for the standard library.
216+
Opts.EnableOperatorDesignatedTypes |= FrontendOpts.ParseStdlib;
217+
215218
Opts.SolverEnableOperatorDesignatedTypes |=
216219
Args.hasArg(OPT_solver_enable_operator_designated_types);
217220

stdlib/public/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if(SWIFT_RUNTIME_USE_SANITIZERS)
1313
endif()
1414
endif()
1515

16-
list(APPEND SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS "-Xfrontend" "-verify-syntax-tree" "-Xfrontend" "-enable-operator-designated-types")
16+
list(APPEND SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS "-Xfrontend" "-verify-syntax-tree")
1717

1818
# Build the runtime with -Wall to catch, e.g., uninitialized variables
1919
# warnings.

0 commit comments

Comments
 (0)