mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[6.2] [SymbolGraphGen] add flags to filter platforms out of availability metadata (#80806)
rdar://144379124
This commit is contained in:
@@ -2221,6 +2221,17 @@ static void ParseSymbolGraphArgs(symbolgraphgen::SymbolGraphOptions &Opts,
|
||||
Opts.MinimumAccessLevel = AccessLevel::Public;
|
||||
}
|
||||
|
||||
if (auto *A = Args.getLastArg(OPT_symbol_graph_allow_availability_platforms,
|
||||
OPT_symbol_graph_block_availability_platforms)) {
|
||||
llvm::SmallVector<StringRef> AvailabilityPlatforms;
|
||||
StringRef(A->getValue())
|
||||
.split(AvailabilityPlatforms, ',', /*MaxSplits*/ -1,
|
||||
/*KeepEmpty*/ false);
|
||||
Opts.AvailabilityPlatforms = llvm::DenseSet<StringRef>(
|
||||
AvailabilityPlatforms.begin(), AvailabilityPlatforms.end());
|
||||
Opts.AvailabilityIsBlockList = A->getOption().matches(OPT_symbol_graph_block_availability_platforms);
|
||||
}
|
||||
|
||||
// default values for generating symbol graphs during a build
|
||||
Opts.PrettyPrint = false;
|
||||
Opts.EmitSynthesizedMembers = true;
|
||||
|
||||
Reference in New Issue
Block a user