mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Print flags of all frontend-integrated tools when -emit-supported-features is passed
This commit is contained in:
@@ -1048,7 +1048,13 @@ static bool printSwiftVersion(const CompilerInvocation &Invocation) {
|
||||
|
||||
static void printSingleFrontendOpt(llvm::opt::OptTable &table, options::ID id,
|
||||
llvm::raw_ostream &OS) {
|
||||
if (table.getOption(id).hasFlag(options::FrontendOption)) {
|
||||
if (table.getOption(id).hasFlag(options::FrontendOption) ||
|
||||
table.getOption(id).hasFlag(options::AutolinkExtractOption) ||
|
||||
table.getOption(id).hasFlag(options::ModuleWrapOption) ||
|
||||
table.getOption(id).hasFlag(options::SwiftIndentOption) ||
|
||||
table.getOption(id).hasFlag(options::SwiftAPIExtractOption) ||
|
||||
table.getOption(id).hasFlag(options::SwiftSymbolGraphExtractOption) ||
|
||||
table.getOption(id).hasFlag(options::SwiftAPIDigesterOption)) {
|
||||
auto name = StringRef(table.getOptionName(id));
|
||||
if (!name.empty()) {
|
||||
OS << " \"" << name << "\",\n";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// RUN: %target-swift-frontend -emit-supported-features %s | %FileCheck %s
|
||||
|
||||
// CHECK: "SupportedArguments"
|
||||
// CHECK: "abi"
|
||||
// CHECK: "emit-module"
|
||||
// CHECK: "LastOption"
|
||||
// CHECK: "SupportedFeatures"
|
||||
|
||||
Reference in New Issue
Block a user