[PATCH] D81995: [xray] Option to omit the function index

Ian Levesque via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 17 19:26:58 PDT 2020


ianlevesque marked 4 inline comments as done.
ianlevesque added inline comments.


================
Comment at: clang/include/clang/Basic/CodeGenOptions.def:114
+///< Set with -fno-xray-function-index to omit the index section.
+CODEGENOPT(XRayOmitFunctionIndex , 1, 0)
+
----------------
MaskRay wrote:
> ianlevesque wrote:
> > MaskRay wrote:
> > > Nit: a variable name with a positive meaning may be easier to understand.
> > I had the entire patch that way at first, making the index something you would enable (defaulting to true) but it was much worse.
> The variable naming should be easily inferrable from the option name. The option does not say `omit`. Doesn't `XRayFunctionIndex` work? How can it be much worse?
Sure just changing the variable name is fine of course. I meant it was worse (many tests needing to be changed) when I tried to make the index opt-in not opt-out and just have the Driver set it by default.


================
Comment at: clang/include/clang/Driver/Options.td:1284
 
+def fxray_function_index : Flag<["-"], "fxray-function-index">,
+  Group<f_Group>, Flags<[CC1Option]>;
----------------
MaskRay wrote:
> This should use OptOutFFlag. I fixed it.
Thanks for the fixes!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81995/new/

https://reviews.llvm.org/D81995





More information about the llvm-commits mailing list