diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -241,17 +241,41 @@ def clang_ignored_gcc_optimization_f_Group : OptionGroup< "">, Group, Flags<[Ignored]>; -class IsDiag { string MacroPrefix = "DIAG_"; } +class DiagnosticOpts + : KeyPathAndMacro<"DiagnosticOpts->", base, "DIAG_"> {} +class LangOpts + : KeyPathAndMacro<"LangOpts->", base> {} +class TargetOpts + : KeyPathAndMacro<"TargetOpts->", base> {} +class FrontendOpts + : KeyPathAndMacro<"FrontendOpts.", base> {} +class PreprocessorOutputOpts + : KeyPathAndMacro<"PreprocessorOutputOpts.", base> {} +class DependencyOutputOpts + : KeyPathAndMacro<"DependencyOutputOpts.", base> {} +class CodeGenOpts + : KeyPathAndMacro<"CodeGenOpts.", base> {} +class HeaderSearchOpts + : KeyPathAndMacro<"HeaderSearchOpts->", base> {} +class PreprocessorOpts + : KeyPathAndMacro<"PreprocessorOpts->", base> {} +class FileSystemOpts + : KeyPathAndMacro<"FileSystemOpts.", base> {} +class AnalyzerOpts + : KeyPathAndMacro<"AnalyzerOpts->", base> {} +class MigratorOpts + : KeyPathAndMacro<"MigratorOpts.", base> {} // A boolean option which is opt-in in CC1. The positive option exists in CC1 and // Args.hasArg(OPT_ffoo) is used to check that the flag is enabled. // This is useful if the option is usually disabled. multiclass OptInFFlag flags=[], code keypath="", + string help="", list flags=[], + KeyPathAndMacro kpm = EmptyKPM, list