Author: Fangrui Song Date: 2022-08-02T00:47:37-07:00 New Revision: afb785f51161b78b9af7d9ecd3ce7632160efee9
URL: https://github.com/llvm/llvm-project/commit/afb785f51161b78b9af7d9ecd3ce7632160efee9 DIFF: https://github.com/llvm/llvm-project/commit/afb785f51161b78b9af7d9ecd3ce7632160efee9.diff LOG: [Driver] Remove Separate form for XRay options Supporting something like `-fxray-instruction-threshold= 1` is not intended. Added: Modified: clang/include/clang/Driver/Options.td clang/lib/Driver/XRayArgs.cpp Removed: ################################################################################ diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index e37b461c95cb4..709dbfd12cdb9 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -2032,31 +2032,28 @@ defm xray_instrument : BoolFOption<"xray-instrument", NegFlag<SetFalse>>; def fxray_instruction_threshold_EQ : - JoinedOrSeparate<["-"], "fxray-instruction-threshold=">, + Joined<["-"], "fxray-instruction-threshold=">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Sets the minimum function size to instrument with XRay">, MarshallingInfoInt<CodeGenOpts<"XRayInstructionThreshold">, "200">; -def fxray_instruction_threshold_ : - JoinedOrSeparate<["-"], "fxray-instruction-threshold">, - Group<f_Group>, Flags<[CC1Option]>; def fxray_always_instrument : - JoinedOrSeparate<["-"], "fxray-always-instrument=">, + Joined<["-"], "fxray-always-instrument=">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.">, MarshallingInfoStringVector<LangOpts<"XRayAlwaysInstrumentFiles">>; def fxray_never_instrument : - JoinedOrSeparate<["-"], "fxray-never-instrument=">, + Joined<["-"], "fxray-never-instrument=">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"DEPRECATED: Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.">, MarshallingInfoStringVector<LangOpts<"XRayNeverInstrumentFiles">>; def fxray_attr_list : - JoinedOrSeparate<["-"], "fxray-attr-list=">, + Joined<["-"], "fxray-attr-list=">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Filename defining the list of functions/types for imbuing XRay attributes.">, MarshallingInfoStringVector<LangOpts<"XRayAttrListFiles">>; def fxray_modes : - JoinedOrSeparate<["-"], "fxray-modes=">, + Joined<["-"], "fxray-modes=">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"List of modes to link in by default into XRay instrumented binaries.">; @@ -2091,7 +2088,7 @@ def fnoxray_link_deps : Flag<["-"], "fnoxray-link-deps">, Group<f_Group>, Flags<[CC1Option]>; def fxray_instrumentation_bundle : - JoinedOrSeparate<["-"], "fxray-instrumentation-bundle=">, + Joined<["-"], "fxray-instrumentation-bundle=">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Select which XRay instrumentation points to emit. Options: all, none, function-entry, function-exit, function, custom. Default is 'all'. 'function' includes both 'function-entry' and 'function-exit'.">; diff --git a/clang/lib/Driver/XRayArgs.cpp b/clang/lib/Driver/XRayArgs.cpp index 63b575178bd12..cf9b5780c4555 100644 --- a/clang/lib/Driver/XRayArgs.cpp +++ b/clang/lib/Driver/XRayArgs.cpp @@ -79,8 +79,7 @@ XRayArgs::XRayArgs(const ToolChain &TC, const ArgList &Args) { XRayInstrument = true; if (const Arg *A = - Args.getLastArg(options::OPT_fxray_instruction_threshold_, - options::OPT_fxray_instruction_threshold_EQ)) { + Args.getLastArg(options::OPT_fxray_instruction_threshold_EQ)) { StringRef S = A->getValue(); if (S.getAsInteger(0, InstructionThreshold) || InstructionThreshold < 0) D.Diag(clang::diag::err_drv_invalid_value) << A->getAsString(Args) << S; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits