[PATCH] D14731: [libcxx] Add clang thread safety annotations to mutex and lock_guard
Marshall Clow via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 30 13:59:17 PST 2015
mclow.lists added a comment.
In general, this looks fine. There are a few nits.
1. There needs to be a way to disable these annotations.
The usual way in libc++ is to check to see if `_LIBCPP_THREAD_ANNOTATION` is already defined, and if so, do not define it. We usually state things in the negative, so the controlling macro should be `_LIBCPP_HAS_NO_THREAD_ANNOTATION`
2. We need to support non-ToT versions of clang, so the test needs to be more nuanced than `#if defined(__clang__)`. See L432 of <__config> for an example there.
More as I see them
http://reviews.llvm.org/D14731
More information about the cfe-commits
mailing list