diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2014-06-26 01:07:56 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2014-06-26 01:07:56 +0000 |
commit | 157a8f91bdf1216b48bb3a116cf06e54cd8e27a1 (patch) | |
tree | 5e4da7a02fffcf0709467dfd065af706037d348e /libcxx/include/__config | |
parent | d286dd6413afada11b0e614be1fbcbd2c8e981eb (diff) | |
download | bcm5719-llvm-157a8f91bdf1216b48bb3a116cf06e54cd8e27a1.tar.gz bcm5719-llvm-157a8f91bdf1216b48bb3a116cf06e54cd8e27a1.zip |
Patch from Albert J. Wong to make type_traits take advantage of gcc intrinsics in 4.7 and later. No functionality change when using clang.
llvm-svn: 211755
Diffstat (limited to 'libcxx/include/__config')
-rw-r--r-- | libcxx/include/__config | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config index c6285247edf..981cc9f3cc2 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -339,7 +339,11 @@ typedef __char32_t char32_t; #endif #if __has_feature(underlying_type) -# define _LIBCXX_UNDERLYING_TYPE(T) __underlying_type(T) +# define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T) +#endif + +#if __has_feature(is_literal) +# define _LIBCPP_IS_LITERAL(T) __is_literal(T) #endif // Inline namespaces are available in Clang regardless of C++ dialect. @@ -363,6 +367,11 @@ namespace std { #define _LIBCPP_NORETURN __attribute__((noreturn)) +#if _GNUC_VER >= 407 +#define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T) +#define _LIBCPP_IS_LITERAL(T) __is_literal_type(T) +#endif + #if !__EXCEPTIONS #define _LIBCPP_NO_EXCEPTIONS #endif |