[PATCH] D28223: clean up use of _WIN32

Marshall Clow via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 3 13:43:12 PST 2017


mclow.lists accepted this revision.
mclow.lists added a comment.
This revision is now accepted and ready to land.

LGTM.  My comment is a suggestion, not a requirement.



================
Comment at: include/support/win32/support.h:112
 // Search from LSB to MSB for first set bit.
 // Returns zero if no set bit is found.
+#if (defined(_M_ARM) || defined(__arm__)) ||                                   \
----------------
I would be tempted to add another macro here. Something like:

    #if (defined(_M_ARM) || defined(__arm__)) ||                 \
          (defined(_M_AMD64) || defined(__x86_64__))
    #define _LIBCPP_WIN_HAS_BITSCAN
    #endif

to avoid repeating the "four-armed combo"


Repository:
  rL LLVM

https://reviews.llvm.org/D28223





More information about the cfe-commits mailing list