[libcxx-commits] [PATCH] D144923: [libc++] Temporarily not use compiler intrinsics for some type traits in Objective-C++ mode.

Konstantin Varlamov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 27 15:22:50 PST 2023


var-const added inline comments.


================
Comment at: libcxx/include/__config:1262
 
+// TODO(varconst): currently, there are bugs in Clang's intrinsics when handling Objective-C++ `id`, so don't use
+// compiler intrinsics in the Objective-C++ mode.
----------------
philnik wrote:
> Can you file a bug against Clang and link it here? This makes it easier to check whether the bug is fixed.
That's a good point, will do.


================
Comment at: libcxx/include/__config:1264-1266
+#ifndef __OBJC__
+#define _LIBCPP_USING_TYPE_TRAITS_COMPILER_INTRINSICS
+#endif
----------------
philnik wrote:
> We normally disable stuff the other way around. Is there a reason to do it differently here?
I used `_LIBCPP_USING_DEV_RANDOM` as the model, and I saw it more like "Are we allowed to use this feature?" rather than "Should we suppress the use of this feature?" I feel that our type traits are undertested and there might be more issues with the compiler intrinsics, so the default should be to use the old implementation (which, while still undertested in our code, is known to work in the wild with no major issues).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144923/new/

https://reviews.llvm.org/D144923



More information about the libcxx-commits mailing list