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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to