[PATCH] D14731: [libcxx] Add clang thread safety annotations to mutex and lock_guard
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 11 11:20:13 PST 2016
EricWF added a comment.
In http://reviews.llvm.org/D14731#373301, @jamesr wrote:
> In http://reviews.llvm.org/D14731#373289, @EricWF wrote:
>
> > My suggestion would be to make these annotations OFF by default and allow users to turn them on with a macro.
>
>
> Our comments crossed streams but suggested the same thing :). Any suggestions on a naming convention for the guard? Also, would I set this macro unconditionally in LIT or is there a way to have it run tests both with and without the macro to ensure that when it is off code like the snippet you posted continues to build unmodified?
My suggestion would be `_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS` but I'm bad at naming things :-P
I think we leave the macro off in LIT because each test can `#define` it at the top of the file if it want's it on.
http://reviews.llvm.org/D14731
More information about the cfe-commits
mailing list