Skip to content

Commit 7c0859d

Browse files
committed
Add frontend flags for staging cross-import overlays
1 parent bf7ac27 commit 7c0859d

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

include/swift/Basic/LangOptions.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ namespace swift {
109109
/// human-readable string.
110110
bool EnableConcisePoundFile = false;
111111

112+
/// Detect and automatically import modules' cross-import overlays.
113+
bool EnableCrossImportOverlays = false;
114+
112115
///
113116
/// Support for alternate usage modes
114117
///

include/swift/Option/FrontendOptions.td

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ def verify_syntax_tree : Flag<["-"], "verify-syntax-tree">,
126126
def show_diagnostics_after_fatal : Flag<["-"], "show-diagnostics-after-fatal">,
127127
HelpText<"Keep emitting subsequent diagnostics after a fatal error">;
128128

129+
def enable_cross_import_overlays : Flag<["-"], "enable-cross-import-overlays">,
130+
HelpText<"Automatically import declared cross-import overlays.">;
131+
def disable_cross_import_overlays : Flag<["-"], "disable-cross-import-overlays">,
132+
HelpText<"Do not automatically import declared cross-import overlays.">;
133+
129134
def enable_descriptive_diagnostics : Flag<["-"], "enable-descriptive-diagnostics">,
130135
HelpText<"Show descriptive diagnostic information, if available.">;
131136

lib/Frontend/CompilerInvocation.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,11 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
543543
Opts.EnableConcisePoundFile =
544544
Args.hasArg(OPT_enable_experimental_concise_pound_file);
545545

546+
Opts.EnableCrossImportOverlays =
547+
Args.hasFlag(OPT_enable_cross_import_overlays,
548+
OPT_disable_cross_import_overlays,
549+
false);
550+
546551
llvm::Triple Target = Opts.Target;
547552
StringRef TargetArg;
548553
if (const Arg *A = Args.getLastArg(OPT_target)) {

0 commit comments

Comments
 (0)