[PATCH] D28223: clean up use of _WIN32
Saleem Abdulrasool via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 3 10:10:46 PST 2017
compnerd added inline comments.
================
Comment at: include/__config:158
+#if defined(_WIN32)
+# define _LIBCPP_WIN32 1
# define _LIBCPP_LITTLE_ENDIAN 1
----------------
EricWF wrote:
> smeenai wrote:
> > 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?
> +1 for that name, since it is self documenting.
Yeah, I like `WIN32API` better too. Ill change that.
================
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
----------------
EricWF wrote:
> smeenai wrote:
> > Windows has `catopen`?
> This is nested in a block that already excludes windows.
What @EricWF said :-).
================
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);
----------------
EricWF wrote:
> smeenai wrote:
> > Might be cleaner to have a `_LIBCPP_COFF` macro (both here and for the similar `__config` change), to make the intent clearer?
> +1 for `_LIBCPP_COFF` or similar. I would rather explicitly exclude coff than include a list of supported formats.
WFM, Ill introduce a `_LIBCPP_ELF`, `_LIBCPP_MACHO`, and `_LIBCPP_COFF`.
Repository:
rL LLVM
https://reviews.llvm.org/D28223
More information about the cfe-commits
mailing list