[PATCH] D20352: Add XRay flags to Clang
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 6 06:41:22 PDT 2016
aaron.ballman added inline comments.
================
Comment at: include/clang/Basic/Attr.td:436
@@ +435,3 @@
+ CXX11<"clang", "xray_never_instrument">];
+ let Subjects = SubjectList<[CXXMethod, ObjCMethod, Function], WarnDiag,
+ "ExpectedFunctionOrMethod">;
----------------
That's fine by me (it's also fine to do as part of this patch since this patch will be what exercises that functionality anyway). Your choice. :-)
================
Comment at: include/clang/Basic/AttrDocs.td:2457
@@ +2456,3 @@
+ let Content = [{
+``__attribute__((xray_always_instrument))`` or ``[[clang:xray_always_instrument]]`` is used to mark member functions (in C++), methods (in Objective C), and free functions (in C, C++, and Objective C) to be instrumented with XRay. This will cause the function to always have space at the beginning and exit points to allow for runtime patching.
+
----------------
I think that makes sense. I mostly want to avoid having multiple user-facing attributes that do very similar operations under different names. That makes it confusing for users, and makes for possibly more-complicated code (are these mutually exclusive attributes, etc). I am less worried about whether the backend has multiple attributes, though I suspect the same concerns may apply there as well.
http://reviews.llvm.org/D20352
More information about the cfe-commits
mailing list