mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
include comments on SPI symbols when they're in symbol graphs
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "swift/Option/Options.h"
|
||||
#include "swift/Option/SanitizerOptions.h"
|
||||
#include "swift/Strings.h"
|
||||
#include "swift/SymbolGraphGen/SymbolGraphOptions.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/ADT/Triple.h"
|
||||
#include "llvm/Option/Arg.h"
|
||||
@@ -1019,6 +1020,28 @@ static bool ParseClangImporterArgs(ClangImporterOptions &Opts,
|
||||
return false;
|
||||
}
|
||||
|
||||
static void ParseSymbolGraphArgs(symbolgraphgen::SymbolGraphOptions &Opts,
|
||||
ArgList &Args,
|
||||
DiagnosticEngine &Diags,
|
||||
LangOptions &LangOpts) {
|
||||
using namespace options;
|
||||
|
||||
if (const Arg *A = Args.getLastArg(OPT_emit_symbol_graph_dir)) {
|
||||
Opts.OutputDir = A->getValue();
|
||||
}
|
||||
|
||||
Opts.Target = LangOpts.Target;
|
||||
|
||||
Opts.SkipInheritedDocs = Args.hasArg(OPT_skip_inherited_docs);
|
||||
Opts.IncludeSPISymbols = Args.hasArg(OPT_include_spi_symbols);
|
||||
|
||||
// default values for generating symbol graphs during a build
|
||||
Opts.MinimumAccessLevel = AccessLevel::Public;
|
||||
Opts.PrettyPrint = false;
|
||||
Opts.EmitSynthesizedMembers = true;
|
||||
Opts.PrintMessages = false;
|
||||
}
|
||||
|
||||
static bool ParseSearchPathArgs(SearchPathOptions &Opts,
|
||||
ArgList &Args,
|
||||
DiagnosticEngine &Diags,
|
||||
@@ -1973,6 +1996,8 @@ bool CompilerInvocation::parseArgs(
|
||||
return true;
|
||||
}
|
||||
|
||||
ParseSymbolGraphArgs(SymbolGraphOpts, ParsedArgs, Diags, LangOpts);
|
||||
|
||||
if (ParseSearchPathArgs(SearchPathOpts, ParsedArgs, Diags,
|
||||
workingDirectory)) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user