Skip to content

Commit 07215c2

Browse files
authored
Merge pull request #69214 from tshortli/lazy-typecheck-implies-skip-non-exportable
Frontend: Temporarily force decl skipping with -experimental-lazy-typecheck
2 parents 37a6374 + 619b6e6 commit 07215c2

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/Frontend/ArgsToFrontendOptionsConverter.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,8 @@ bool ArgsToFrontendOptionsConverter::convert(
322322

323323
Opts.SkipNonExportableDecls |=
324324
Args.hasArg(OPT_experimental_skip_non_exportable_decls);
325+
// FIXME: Remove this with rdar://117020997
326+
Opts.SkipNonExportableDecls |= Args.hasArg(OPT_experimental_lazy_typecheck);
325327
Opts.DebugPrefixSerializedDebuggingOptions |=
326328
Args.hasArg(OPT_prefix_serialized_debugging_options);
327329
Opts.EnableSourceImport |= Args.hasArg(OPT_enable_source_import);

test/Serialization/lazy-typecheck.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
// RUN: %target-swift-frontend -swift-version 5 %S/../Inputs/lazy_typecheck.swift -enable-library-evolution -parse-as-library -package-name Package -DFLAG -typecheck -verify
33
// RUN: %target-swift-frontend -swift-version 5 %S/../Inputs/lazy_typecheck.swift -module-name lazy_typecheck -emit-module -emit-module-path %t/lazy_typecheck.swiftmodule -enable-library-evolution -parse-as-library -package-name Package -DFLAG -experimental-lazy-typecheck -experimental-skip-all-function-bodies -experimental-skip-non-exportable-decls
44

5+
// Verify the module also builds without -experimental-skip-non-exportable-decls
6+
// FIXME: Remove with rdar://117020997
7+
// RUN: %target-swift-frontend -swift-version 5 %S/../Inputs/lazy_typecheck.swift -module-name lazy_typecheck -emit-module -emit-module-path /dev/null -enable-library-evolution -parse-as-library -package-name Package -DFLAG -experimental-lazy-typecheck -experimental-skip-all-function-bodies
8+
59
// RUN: %target-swift-frontend -package-name Package -typecheck -verify %S/../Inputs/lazy_typecheck_client.swift -DFLAG -I %t
610

711
// FIXME: Re-run the test with -experimental-skip-non-inlinable-function-bodies

0 commit comments

Comments
 (0)