[Driver] Remove Separate form for XRay options

Supporting something like `-fxray-instruction-threshold= 1` is not intended.
This commit is contained in:
Fangrui Song 2022-08-02 00:47:36 -07:00
parent 62e4ee2def
commit afb785f511
2 changed files with 7 additions and 11 deletions

View File

@ -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'.">;

View File

@ -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;