[libcxx-commits] [PATCH] D59607: libc++/win: Make once_flag have the same size as a pointer

Eric Fiselier via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 21 18:58:03 PDT 2019


EricWF added inline comments.


================
Comment at: libcxx/trunk/include/mutex:579-583
+#if defined(_LIBCPP_ABI_MICROSOFT)
+   typedef uintptr_t _State_type;
+#else
+   typedef unsigned long _State_type;
+#endif
----------------
ruiu wrote:
> Did you have to use `if defined`? Looks like you can always use uintptr_t.
Yes. Because although `uintptr_t` may always have the same size and alignment as `unsigned long` on non-windows platforms, it may not produce the same mangling. And we have symbols in the dylib that depend on the mangling.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D59607





More information about the libcxx-commits mailing list