[libcxx] r195144 - Patch by Xing Xue to improve libc++ support for AIX

Marshall Clow mclow.lists at gmail.com
Tue Nov 19 11:16:03 PST 2013


Author: marshall
Date: Tue Nov 19 13:16:03 2013
New Revision: 195144

URL: http://llvm.org/viewvc/llvm-project?rev=195144&view=rev
Log:
Patch by Xing Xue to improve libc++ support for AIX

Modified:
    libcxx/trunk/include/__config
    libcxx/trunk/include/support/ibm/support.h
    libcxx/trunk/src/locale.cpp

Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=195144&r1=195143&r2=195144&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Tue Nov 19 13:16:03 2013
@@ -454,7 +454,6 @@ namespace std {
 #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 #define _LIBCPP_HAS_NO_NULLPTR
 #define _LIBCPP_HAS_NO_UNICODE_CHARS
-#define _LIBCPP_HAS_NO_STRONG_ENUMS
 #define _LIBCPP_HAS_IS_BASE_OF
 
 #if defined(_AIX)
@@ -514,7 +513,7 @@ template <unsigned> struct __static_asse
 #define __has_feature(__x) 0
 #endif
 
-#if __has_feature(cxx_explicit_conversions)
+#if __has_feature(cxx_explicit_conversions) || defined(__IBMCPP__)
 #   define _LIBCPP_EXPLICIT explicit
 #else
 #   define _LIBCPP_EXPLICIT

Modified: libcxx/trunk/include/support/ibm/support.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/support/ibm/support.h?rev=195144&r1=195143&r2=195144&view=diff
==============================================================================
--- libcxx/trunk/include/support/ibm/support.h (original)
+++ libcxx/trunk/include/support/ibm/support.h Tue Nov 19 13:16:03 2013
@@ -15,7 +15,7 @@ extern "builtin" int __popcnt4(unsigned
 extern "builtin" int __popcnt8(unsigned long long);
 extern "builtin" unsigned int __cnttz4(unsigned int);
 extern "builtin" unsigned int __cnttz8(unsigned long long);
-extern "builtin" unsigned int __cntlz4(unsigned long long);
+extern "builtin" unsigned int __cntlz4(unsigned int);
 extern "builtin" unsigned int __cntlz8(unsigned long long);
 
 // Builtin functions for counting population

Modified: libcxx/trunk/src/locale.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/locale.cpp?rev=195144&r1=195143&r2=195144&view=diff
==============================================================================
--- libcxx/trunk/src/locale.cpp (original)
+++ libcxx/trunk/src/locale.cpp Tue Nov 19 13:16:03 2013
@@ -1036,7 +1036,7 @@ ctype<char>::classic_table()  _NOEXCEPT
 #elif defined(__EMSCRIPTEN__)
     return *__ctype_b_loc();
 #elif defined(_AIX)
-    return (const unsigned long *)__lc_ctype_ptr->obj->mask;
+    return (const unsigned int *)__lc_ctype_ptr->obj->mask;
 #else
     // Platform not supported: abort so the person doing the port knows what to
     // fix





More information about the cfe-commits mailing list