[PATCH] D28223: clean up use of _WIN32

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 2 21:44:37 PST 2017


smeenai added a comment.

Sweet.



================
Comment at: include/__config:158
+#if defined(_WIN32)
+#  define _LIBCPP_WIN32         1
 #  define _LIBCPP_LITTLE_ENDIAN 1
----------------
Perhaps `_LIBCPP_WIN32API` instead, to be clear that this is specific to the usage of Win32 APIs, rather than just a general catch-all libc++ on Windows macro?


================
Comment at: include/__config:791
 // Most unix variants have catopen.  These are the specific ones that don't.
-#if !defined(_WIN32) && !defined(__BIONIC__) && !defined(_NEWLIB_VERSION)
+#if !defined(__BIONIC__) && !defined(_NEWLIB_VERSION)
 #define _LIBCPP_HAS_CATOPEN 1
----------------
Windows has `catopen`?


================
Comment at: include/type_traits:1684
 // PE/COFF does not support alignment beyond 8192 (=0x2000)
-#if !defined(_WIN32)
+#if !defined(__ELF__) && !defined(__MACH__)
 _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x4000);
----------------
Might be cleaner to have a `_LIBCPP_COFF` macro (both here and for the similar `__config` change), to make the intent clearer?


Repository:
  rL LLVM

https://reviews.llvm.org/D28223





More information about the cfe-commits mailing list