From 2541fd5eeacc94a7525217cce873764cfddc7356 Mon Sep 17 00:00:00 2001 From: Ryan Mansfield Date: Thu, 17 Oct 2024 11:21:38 -0400 Subject: [PATCH] Add -Rpass-analysis= option. --- Sources/SwiftDriver/Jobs/FrontendJobHelpers.swift | 1 + Sources/SwiftOptions/Options.swift | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Sources/SwiftDriver/Jobs/FrontendJobHelpers.swift b/Sources/SwiftDriver/Jobs/FrontendJobHelpers.swift index 0b340dfeb..bbca9c821 100644 --- a/Sources/SwiftDriver/Jobs/FrontendJobHelpers.swift +++ b/Sources/SwiftDriver/Jobs/FrontendJobHelpers.swift @@ -220,6 +220,7 @@ extension Driver { try commandLine.appendLast(.warnSwift3ObjcInference, from: &parsedOptions) try commandLine.appendLast(.remarkLoadingModule, from: &parsedOptions) try commandLine.appendLast(.RpassEQ, from: &parsedOptions) + try commandLine.appendLast(.RpassAnalysisEQ, from: &parsedOptions) try commandLine.appendLast(.RpassMissedEQ, from: &parsedOptions) try commandLine.appendLast(.suppressWarnings, from: &parsedOptions) try commandLine.appendLast(.profileGenerate, from: &parsedOptions) diff --git a/Sources/SwiftOptions/Options.swift b/Sources/SwiftOptions/Options.swift index 90be5d999..759d64f8e 100644 --- a/Sources/SwiftOptions/Options.swift +++ b/Sources/SwiftOptions/Options.swift @@ -733,6 +733,7 @@ extension Option { public static let remarkLoadingModule: Option = Option("-Rmodule-loading", .flag, attributes: [.frontend, .doesNotAffectIncrementalBuild], helpText: "Emit remarks about loaded module") public static let remarkModuleRecovery: Option = Option("-Rmodule-recovery", .flag, attributes: [.frontend, .doesNotAffectIncrementalBuild], helpText: "Emit remarks about contextual inconsistencies in loaded modules") public static let remarkModuleSerialization: Option = Option("-Rmodule-serialization", .flag, attributes: [.frontend, .doesNotAffectIncrementalBuild], helpText: "Emit remarks about module serialization") + public static let RpassAnalysisEQ: Option = Option("-Rpass-analysis=", .joined, attributes: [.frontend], helpText: "Report transformation analysis from optimization passes whose name matches the given POSIX regular expression") public static let RpassMissedEQ: Option = Option("-Rpass-missed=", .joined, attributes: [.frontend], helpText: "Report missed transformations by optimization passes whose name matches the given POSIX regular expression") public static let RpassEQ: Option = Option("-Rpass=", .joined, attributes: [.frontend], helpText: "Report performed transformations by optimization passes whose name matches the given POSIX regular expression") public static let remarkSkipExplicitInterfaceBuild: Option = Option("-Rskip-explicit-interface-build", .flag, attributes: [.frontend, .doesNotAffectIncrementalBuild], helpText: "Emit a remark if an explicit module interface invocation has an early exit because the expected output is up-to-date") @@ -1610,6 +1611,7 @@ extension Option { Option.remarkLoadingModule, Option.remarkModuleRecovery, Option.remarkModuleSerialization, + Option.RpassAnalysisEQ, Option.RpassMissedEQ, Option.RpassEQ, Option.remarkSkipExplicitInterfaceBuild,