Add optional -emit-symbol-graph output when emitting modules

rdar://71497047
This commit is contained in:
Ashley Garland
2020-09-21 13:31:38 -07:00
committed by Ashley Garland
parent 96397ec472
commit 69c4fc47cb
17 changed files with 114 additions and 27 deletions

View File

@@ -682,6 +682,12 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
Opts.AttachCommentsToDecls = true;
}
// If we are emitting a symbol graph file, configure lexing and parsing to
// remember comments.
if (FrontendOpts.EmitSymbolGraph) {
Opts.AttachCommentsToDecls = true;
}
// If we're parsing SIL, access control doesn't make sense to enforce.
if (Args.hasArg(OPT_parse_sil) ||
FrontendOpts.InputsAndOutputs.shouldTreatAsSIL()) {