[PATCH] D35174: [libc++] Fix unrepresentable enum for clang-cl unstable ABI
Ben Craig via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 10 07:06:48 PDT 2017
bcraig updated this revision to Diff 105845.
bcraig edited the summary of this revision.
bcraig added a comment.
Switched to static consts
https://reviews.llvm.org/D35174
Files:
include/string
Index: include/string
===================================================================
--- include/string
+++ include/string
@@ -676,11 +676,11 @@
};
#if _LIBCPP_BIG_ENDIAN
- enum {__short_mask = 0x01};
- enum {__long_mask = 0x1ul};
+ static const size_type __short_mask = 0x01;
+ static const size_type __long_mask = 0x1ul;
#else // _LIBCPP_BIG_ENDIAN
- enum {__short_mask = 0x80};
- enum {__long_mask = ~(size_type(~0) >> 1)};
+ static const size_type __short_mask = 0x80;
+ static const size_type __long_mask = ~(size_type(~0) >> 1);
#endif // _LIBCPP_BIG_ENDIAN
enum {__min_cap = (sizeof(__long) - 1)/sizeof(value_type) > 2 ?
@@ -706,11 +706,11 @@
};
#if _LIBCPP_BIG_ENDIAN
- enum {__short_mask = 0x80};
- enum {__long_mask = ~(size_type(~0) >> 1)};
+ static const size_type __short_mask = 0x80;
+ static const size_type __long_mask = ~(size_type(~0) >> 1);
#else // _LIBCPP_BIG_ENDIAN
- enum {__short_mask = 0x01};
- enum {__long_mask = 0x1ul};
+ static const size_type __short_mask = 0x01;
+ static const size_type __long_mask = 0x1ul;
#endif // _LIBCPP_BIG_ENDIAN
enum {__min_cap = (sizeof(__long) - 1)/sizeof(value_type) > 2 ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35174.105845.patch
Type: text/x-patch
Size: 1232 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170710/440c33c8/attachment.bin>
More information about the cfe-commits
mailing list