NegFlag<SetFalse>>;
defm xray_function_index : BoolFOption<"xray-function-index",
- CodeGenOpts<"XRayFunctionIndex">, DefaultFalse,
- PosFlag<SetTrue, [CC1Option]>,
- NegFlag<SetFalse, [], "Omit function index section at the"
+ CodeGenOpts<"XRayFunctionIndex">, DefaultTrue,
+ PosFlag<SetTrue, []>,
+ NegFlag<SetFalse, [CC1Option], "Omit function index section at the"
" expense of single-function patching performance">>;
def fxray_link_deps : Flag<["-"], "fxray-link-deps">, Group<f_Group>,
options::OPT_fno_xray_always_emit_typedevents);
Args.addOptInFlag(CmdArgs, options::OPT_fxray_ignore_loops,
options::OPT_fno_xray_ignore_loops);
- Args.addOptInFlag(CmdArgs, options::OPT_fxray_function_index,
- options::OPT_fno_xray_function_index);
+ Args.addOptOutFlag(CmdArgs, options::OPT_fxray_function_index,
+ options::OPT_fno_xray_function_index);
if (const Arg *A =
Args.getLastArg(options::OPT_fxray_instruction_threshold_EQ)) {
// REQUIRES: x86-registered-target
-// RUN: %clang_cc1 -S -triple x86_64 -fxray-instrument -fxray-instruction-threshold=1 -fxray-function-index %s -o - | FileCheck %s
-// RUN: %clang_cc1 -S -triple x86_64 -fxray-instrument -fxray-instruction-threshold=1 %s -o - | FileCheck %s --check-prefix=NO
+// RUN: %clang_cc1 -S -triple x86_64 -fxray-instrument -fxray-instruction-threshold=1 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -S -triple x86_64 -fxray-instrument -fxray-instruction-threshold=1 -fno-xray-function-index %s -o - | FileCheck %s --check-prefix=NO
// CHECK: .section xray_fn_idx,"awo",@progbits,foo
// NO-NOT: .section xray_fn_idx
-// RUN: %clang -### -c --target=x86_64 -fxray-instrument -fxray-function-index %s 2>&1 | FileCheck %s
-// RUN: %clang -### -c --target=x86_64 -fxray-instrument %s 2>&1 | FileCheck %s --check-prefix=DISABLED
+// RUN: %clang -### -c --target=x86_64 -fxray-instrument %s 2>&1 | FileCheck %s
+// RUN: %clang -### -c --target=x86_64 -fxray-instrument -fxray-function-index -fno-xray-function-index %s 2>&1 | FileCheck %s --check-prefix=DISABLED
-// CHECK: "-fxray-function-index"
-// DISABLED-NOT: "-fxray-function-index"
+// CHECK-NOT: "-fxray-function-index"
+// DISABLED: "-fno-xray-function-index"