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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 17 19:58:49 PDT 2020


MaskRay 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)
+
----------------
ianlevesque wrote:
> 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.
I mean you can use a variable named `XRayFunctionIndex` which defaults to true. This is similar to an `XRayOmitFunctionIndex` which defaults to false.


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