Browse Source

Patch by Xing Xue to improve libc++ support for AIX

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@195144 91177308-0d34-0410-b5e6-96231b3b80d8
Marshall Clow 11 years ago
parent
commit
016d4e847a
3 changed files with 3 additions and 4 deletions
  1. 1 2
      include/__config
  2. 1 1
      include/support/ibm/support.h
  3. 1 1
      src/locale.cpp

+ 1 - 2
include/__config

@@ -454,7 +454,6 @@ namespace std {
 #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 #define _LIBCPP_HAS_NO_NULLPTR
 #define _LIBCPP_HAS_NO_NULLPTR
 #define _LIBCPP_HAS_NO_UNICODE_CHARS
 #define _LIBCPP_HAS_NO_UNICODE_CHARS
-#define _LIBCPP_HAS_NO_STRONG_ENUMS
 #define _LIBCPP_HAS_IS_BASE_OF
 #define _LIBCPP_HAS_IS_BASE_OF
 
 
 #if defined(_AIX)
 #if defined(_AIX)
@@ -514,7 +513,7 @@ template <unsigned> struct __static_assert_check {};
 #define __has_feature(__x) 0
 #define __has_feature(__x) 0
 #endif
 #endif
 
 
-#if __has_feature(cxx_explicit_conversions)
+#if __has_feature(cxx_explicit_conversions) || defined(__IBMCPP__)
 #   define _LIBCPP_EXPLICIT explicit
 #   define _LIBCPP_EXPLICIT explicit
 #else
 #else
 #   define _LIBCPP_EXPLICIT
 #   define _LIBCPP_EXPLICIT

+ 1 - 1
include/support/ibm/support.h

@@ -15,7 +15,7 @@ extern "builtin" int __popcnt4(unsigned int);
 extern "builtin" int __popcnt8(unsigned long long);
 extern "builtin" int __popcnt8(unsigned long long);
 extern "builtin" unsigned int __cnttz4(unsigned int);
 extern "builtin" unsigned int __cnttz4(unsigned int);
 extern "builtin" unsigned int __cnttz8(unsigned long long);
 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);
 extern "builtin" unsigned int __cntlz8(unsigned long long);
 
 
 // Builtin functions for counting population
 // Builtin functions for counting population

+ 1 - 1
src/locale.cpp

@@ -1036,7 +1036,7 @@ ctype<char>::classic_table()  _NOEXCEPT
 #elif defined(__EMSCRIPTEN__)
 #elif defined(__EMSCRIPTEN__)
     return *__ctype_b_loc();
     return *__ctype_b_loc();
 #elif defined(_AIX)
 #elif defined(_AIX)
-    return (const unsigned long *)__lc_ctype_ptr->obj->mask;
+    return (const unsigned int *)__lc_ctype_ptr->obj->mask;
 #else
 #else
     // Platform not supported: abort so the person doing the port knows what to
     // Platform not supported: abort so the person doing the port knows what to
     // fix
     // fix