Skip to content

Commit 9ecb6b4

Browse files
authored
Merge pull request #67980 from tshortli/stop-ignoring-me
Frontend: Migrate several options to no longer be ignorable in swiftinterfaces
2 parents be34921 + 100789c commit 9ecb6b4

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
/include/swift/IDE/ @ahoppen @bnbarham @rintaro @hamishknight
6969
/include/swift/Index/ @bnbarham
7070
/include/swift/Refactoring @ahoppen @bnbarham
71+
/include/swift/Option/*Options* @tshortli
7172
/include/swift/Parse/ @ahoppen @bnbarham @CodaFi @DougGregor @rintaro
7273
/include/swift/PrintAsClang @zoecarver @hyp @egorzhdan
7374
# TODO: /include/swift/SIL/

include/swift/Option/Options.td

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ def package_name : Separate<["-"], "package-name">,
532532
Flags<[FrontendOption, ModuleInterfaceOptionIgnorablePrivate]>,
533533
HelpText<"Name of the package the module belongs to">;
534534
def export_as : Separate<["-"], "export-as">,
535-
Flags<[FrontendOption, ModuleInterfaceOptionIgnorable]>,
535+
Flags<[FrontendOption, ModuleInterfaceOption]>,
536536
HelpText<"Module name to use when referenced in clients module interfaces">;
537537

538538
def emit_module : Flag<["-"], "emit-module">,
@@ -762,7 +762,7 @@ def disable_actor_data_race_checks :
762762
HelpText<"Disable runtime checks for actor data races">;
763763

764764
def enable_bare_slash_regex : Flag<["-"], "enable-bare-slash-regex">,
765-
Flags<[FrontendOption, ModuleInterfaceOptionIgnorable]>,
765+
Flags<[FrontendOption, ModuleInterfaceOption]>,
766766
HelpText<"Enable the use of forward slash regular-expression literal syntax">;
767767

768768
def warn_implicit_overrides :
@@ -794,11 +794,11 @@ def strict_concurrency : Joined<["-"], "strict-concurrency=">,
794794

795795
def enable_experimental_feature :
796796
Separate<["-"], "enable-experimental-feature">,
797-
Flags<[FrontendOption, ModuleInterfaceOptionIgnorable]>,
797+
Flags<[FrontendOption, ModuleInterfaceOption]>,
798798
HelpText<"Enable an experimental feature">;
799799

800800
def enable_upcoming_feature : Separate<["-"], "enable-upcoming-feature">,
801-
Flags<[FrontendOption, ModuleInterfaceOptionIgnorable]>,
801+
Flags<[FrontendOption, ModuleInterfaceOption]>,
802802
HelpText<"Enable a feature that will be introduced in an upcoming language "
803803
"version">;
804804

@@ -1286,7 +1286,7 @@ def explain_module_dependency : Separate<["-"], "explain-module-dependency">,
12861286
HelpText<"Emit remark/notes describing why compilaiton may depend on a module with a given name.">;
12871287

12881288
def min_inlining_target_version : Separate<["-"], "target-min-inlining-version">,
1289-
Flags<[FrontendOption, ModuleInterfaceOptionIgnorable]>,
1289+
Flags<[FrontendOption, ModuleInterfaceOption]>,
12901290
HelpText<"Require inlinable code with no '@available' attribute to back-deploy "
12911291
"to this version of the '-target' OS">;
12921292

@@ -1405,12 +1405,12 @@ def working_directory_EQ : Joined<["-"], "working-directory=">,
14051405
Alias<working_directory>;
14061406

14071407
def user_module_version : Separate<["-"], "user-module-version">,
1408-
Flags<[FrontendOption, ModuleInterfaceOptionIgnorable, NewDriverOnlyOption]>,
1408+
Flags<[FrontendOption, ModuleInterfaceOption, NewDriverOnlyOption]>,
14091409
HelpText<"Module version specified from Swift module authors">,
14101410
MetaVarName<"<vers>">;
14111411

14121412
def allowable_client : Separate<["-"], "allowable-client">,
1413-
Flags<[FrontendOption, ModuleInterfaceOptionIgnorable, NewDriverOnlyOption]>,
1413+
Flags<[FrontendOption, ModuleInterfaceOption, NewDriverOnlyOption]>,
14141414
HelpText<"Module names that are allowed to import this module">,
14151415
MetaVarName<"<vers>">;
14161416
// VFS

lib/AST/ModuleDependencies.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,8 +622,8 @@ ModuleDependenciesCache::ModuleDependenciesCache(
622622
std::string scannerContextHash)
623623
: globalScanningService(globalScanningService),
624624
mainScanModuleName(mainScanModuleName),
625-
moduleOutputPath(moduleOutputPath),
626625
scannerContextHash(scannerContextHash),
626+
moduleOutputPath(moduleOutputPath),
627627
clangScanningTool(*globalScanningService.ClangScanningService,
628628
globalScanningService.getClangScanningFS()) {
629629
globalScanningService.configureForContextHash(scannerContextHash);

test/ModuleInterface/allowable-client.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
// RUN: %FileCheck %s --check-prefix=INTERFACE-FLAG < %t/textual/Foo.swiftinterface
99

10-
// INTERFACE-FLAG: swift-module-flags-ignorable:
10+
// INTERFACE-FLAG: swift-module-flags:
1111
// INTERFACE-FLAG: -allowable-client FooFriend1 -allowable-client FooFriend2 -allowable-client FooFriend3
1212

1313

test/ModuleInterface/option-filtering.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//
66
// CHECK-SWIFTINTERFACE-NOT: -enable-experimental-feature LayoutStringValueWitnesses
77
// CHECK-SWIFTINTERFACE-NOT: -enable-experimental-feature LayoutStringValueWitnessesInstantiation
8-
// CHECK-SWIFTINTERFACE: swift-module-flags-ignorable:
8+
// CHECK-SWIFTINTERFACE: swift-module-flags:
99
// CHECK-SWIFTINTERFACE-SAME: -enable-experimental-feature MoveOnlyClasses
1010
// CHECK-SWIFTINTERFACE-SAME: -enable-experimental-feature NoImplicitCopy
1111

test/ModuleInterface/option-preservation.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
//
66
// CHECK-SWIFTINTERFACE: swift-module-flags:
77
// CHECK-SWIFTINTERFACE-SAME: -enable-library-evolution
8+
// CHECK-SWIFTINTERFACE-SAME: -target-min-inlining-version 42
89
// CHECK-SWIFTINTERFACE-SAME: -Onone
910
// CHECK-SWIFTINTERFACE-SAME: -enforce-exclusivity=unchecked
1011
// CHECK-SWIFTINTERFACE-SAME: -autolink-force-load
11-
// CHECK-SWIFTINTERFACE: swift-module-flags-ignorable:
12-
// CHECK-SWIFTINTERFACE-SAME: -target-min-inlining-version 42
1312
// CHECK-SWIFTINTERFACE-SAME: -enable-bare-slash-regex
1413

1514
// Make sure flags show up when filelists are enabled

0 commit comments

Comments
 (0)