This option has undergone several refactorings and got inverted along
the way. The XRayOmitFunctionIndex flag governs codegen behavior,
*omitting* "xray_fn_idx" section if it is set. But the command-line
flag behavior was not adjusted at the time. Right now it's like this:
(default): no function index -fxray-function-index: no function index -fno-xray-function-index: "xray_fn_idx" is present
While the default behavior should be keep "xray_fn_idx", unless
-fno-xray-function-index is given:
(default): "xray_fn_idx" is present -fxray-function-index: same, present, but explicitly -fno-xray-function-index: no function index
Flip the flags to make it so.
The change should be accompanies by a change to clang/lib/Driver/XRayArgs.cpp.
I'll fix this issue myself.
Thanks for reporting the bug, though.