[PATCH] D44970: [XRay][clang] Add flag to choose instrumentation bundles

Dean Michael Berris via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 12 19:28:48 PDT 2018


dberris added a comment.

Thanks, Martin! Landing now, after suggested changes.



================
Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:471
 bool CodeGenFunction::AlwaysEmitXRayCustomEvents() const {
-  return CGM.getCodeGenOpts().XRayAlwaysEmitCustomEvents;
+  return CGM.getCodeGenOpts().XRayInstrumentFunctions &&
+         (CGM.getCodeGenOpts().XRayAlwaysEmitCustomEvents ||
----------------
pelikan wrote:
> I kind of don't like how the "-fxray-instrument" variable is called "XRayInstrumentFunctions" because that's not what it means any more.  I think in a later diff, we should clean this up.  Or maybe even clean up some of the old flags whose functionality has been superseded by this.  But the logic here is fine.
> 
> Same with the misleading "ShouldXRayInstrumentFunction()" which controls custom events too, and not just functions.
Good point. Yes, we could make this cleaner.


https://reviews.llvm.org/D44970





More information about the cfe-commits mailing list