Skip to content

Commit eed54bb

Browse files
committed
Reduce change to compiler invocation and remove options from frontend
1 parent 6a38bbe commit eed54bb

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

include/swift/Option/Options.td

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1779,8 +1779,12 @@ def emit_symbol_graph_dir : Separate<["-"], "emit-symbol-graph-dir">,
17791779
HelpText<"Emit a symbol graph to directory <dir>">,
17801780
MetaVarName<"<dir>">;
17811781

1782+
def symbol_graph_pretty_print: Flag<["-"], "symbol-graph-pretty-print">,
1783+
Flags<[NoInteractiveOption, HelpHidden]>,
1784+
HelpText<"Pretty-print the output symbol graph JSON">;
1785+
17821786
def symbol_graph_skip_synthesized_members: Flag<["-"], "symbol-graph-skip-synthesized-members">,
1783-
Flags<[FrontendOption, NoInteractiveOption, SupplementaryOutput, HelpHidden]>,
1787+
Flags<[NoInteractiveOption, HelpHidden]>,
17841788
HelpText<"Skip members inherited through classes or default implementations">;
17851789

17861790
def symbol_graph_minimum_access_level: Separate<["-"], "symbol-graph-minimum-access-level">,

lib/Frontend/CompilerInvocation.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2257,9 +2257,6 @@ static void ParseSymbolGraphArgs(symbolgraphgen::SymbolGraphOptions &Opts,
22572257
Args.hasFlag(OPT_emit_extension_block_symbols,
22582258
OPT_omit_extension_block_symbols, /*default=*/false);
22592259

2260-
Opts.PrettyPrint = Args.hasArg(OPT_pretty_print);
2261-
Opts.EmitSynthesizedMembers = !Args.hasArg(OPT_symbol_graph_skip_synthesized_members);
2262-
22632260
if (auto *A = Args.getLastArg(OPT_symbol_graph_minimum_access_level)) {
22642261
Opts.MinimumAccessLevel =
22652262
llvm::StringSwitch<AccessLevel>(A->getValue())
@@ -2286,6 +2283,8 @@ static void ParseSymbolGraphArgs(symbolgraphgen::SymbolGraphOptions &Opts,
22862283
}
22872284

22882285
// default values for generating symbol graphs during a build
2286+
Opts.PrettyPrint = false;
2287+
Opts.EmitSynthesizedMembers = true;
22892288
Opts.PrintMessages = false;
22902289
Opts.IncludeClangDocs = false;
22912290
}

0 commit comments

Comments
 (0)