[libcxx-commits] [PATCH] D103705: [libc++] Simplify a few macros in __config
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jun 4 11:36:44 PDT 2021
Quuxplusone added inline comments.
================
Comment at: libcxx/include/__config:1300
-#ifndef _LIBCPP_THREAD_SAFETY_ANNOTATION
-# ifdef _LIBCPP_HAS_THREAD_SAFETY_ANNOTATIONS
-# define _LIBCPP_THREAD_SAFETY_ANNOTATION(x) __attribute__((x))
----------------
phosek wrote:
> ldionne wrote:
> > This looks like a bug to me, but I'm not sure who added those thread safety annotations or when they are used. @phosek I have a feeling I've seen you touch those at some point?
> I added some thread annotations but this predates me, I agree that this looks like a bug.
I'll bite: In what way does this look like a bug? Am I missing something? It looks like it's just saying "If `_LIBCPP_HAS_THREAD_SAFETY_ANNOTATIONS` is defined from line 1294 above (or from the user), then make `_LIBCPP_THREAD_SAFETY_ANNOTATION(x)` do something (if the user hasn't already made it do something else); otherwise make it do nothing." That sounds to me like a reasonable bit of code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103705/new/
https://reviews.llvm.org/D103705
More information about the libcxx-commits
mailing list