[libcxx] r238879 - Move uncaught_exeption() definition inside the #ifdef block like uncaught_exceptions()

Marshall Clow mclow.lists at gmail.com
Tue Jun 2 15:25:24 PDT 2015


Author: marshall
Date: Tue Jun  2 17:25:23 2015
New Revision: 238879

URL: http://llvm.org/viewvc/llvm-project?rev=238879&view=rev
Log:
Move uncaught_exeption() definition inside the #ifdef block like uncaught_exceptions()

Modified:
    libcxx/trunk/include/cstring
    libcxx/trunk/src/exception.cpp

Modified: libcxx/trunk/include/cstring
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/cstring?rev=238879&r1=238878&r2=238879&view=diff
==============================================================================
--- libcxx/trunk/include/cstring (original)
+++ libcxx/trunk/include/cstring Tue Jun  2 17:25:23 2015
@@ -67,15 +67,34 @@ size_t strlen(const char* s);
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 using ::size_t;
-using ::memcpy;
-using ::memmove;
+
+// using ::memcpy;
+inline _LIBCPP_INLINE_VISIBILITY 
+void* memcpy(void* __s1, const void* __s2, size_t __n) __attribute__((nonnull(1, 2)))
+{ return ::memcpy(__s1, __s2, __n); }
+
+// using ::memmove;
+inline _LIBCPP_INLINE_VISIBILITY 
+void* memmove(void* __s1, const void* __s2, size_t __n) __attribute__((nonnull(1, 2)))
+{ return ::memmove(__s1, __s2, __n); }
+
 using ::strcpy;
 using ::strncpy;
 using ::strcat;
 using ::strncat;
-using ::memcmp;
+
+// using ::memcmp;
+inline _LIBCPP_INLINE_VISIBILITY 
+int memcmp(const void* __s1, const void* __s2, size_t __n) __attribute__((nonnull(1, 2)))
+{ return ::memcmp(__s1, __s2, __n); }
+
 using ::strcmp;
-using ::strncmp;
+
+// using ::strncmp;
+inline _LIBCPP_INLINE_VISIBILITY 
+int strncmp(const char* __s1, const char* __s2, size_t __n) __attribute__((nonnull(1, 2)))
+{ return ::memcmp(__s1, __s2, __n); }
+
 using ::strcoll;
 using ::strxfrm;
 

Modified: libcxx/trunk/src/exception.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/exception.cpp?rev=238879&r1=238878&r2=238879&view=diff
==============================================================================
--- libcxx/trunk/src/exception.cpp (original)
+++ libcxx/trunk/src/exception.cpp Tue Jun  2 17:25:23 2015
@@ -105,9 +105,9 @@ terminate() _NOEXCEPT
 #endif // !__EMSCRIPTEN__
 #endif // !defined(LIBCXXRT) && !defined(_LIBCPPABI_VERSION)
 
+#if !defined(LIBCXXRT) && !defined(__GLIBCXX__) && !defined(__EMSCRIPTEN__)
 bool uncaught_exception() _NOEXCEPT { return uncaught_exceptions() > 0; }
 
-#if !defined(LIBCXXRT) && !defined(__GLIBCXX__) && !defined(__EMSCRIPTEN__)
 int uncaught_exceptions() _NOEXCEPT
 {
 #if defined(__APPLE__) || defined(_LIBCPPABI_VERSION)





More information about the cfe-commits mailing list