[libcxx-commits] [PATCH] D124403: [libc++] Refactor max_size.pass.cpp

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 4 11:05:48 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG0e2fb8ac84bd: [libc++] Refactor max_size.pass.cpp (authored by ldionne).

Changed prior to commit:
  https://reviews.llvm.org/D124403?vs=425282&id=427070#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124403/new/

https://reviews.llvm.org/D124403

Files:
  libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp


Index: libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp
===================================================================
--- libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp
+++ libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp
@@ -65,48 +65,28 @@
 }
 
 bool test() {
-#if _LIBCPP_ABI_VERSION == 1
-#ifdef __APPLE__
-
-#  ifdef __aarch64__
-  half_size();
-#  elif defined(__x86_64__)
-  full_size();
-#  else
-#    error "Your target system seems to be unsupported."
-#  endif
 
-#elif defined(__linux__)
+#if _LIBCPP_ABI_VERSION == 1
 
-#  ifdef  __x86_64__
+# if defined(__x86_64__)
   full_size();
-#  elif defined(__arm__) || defined(__aarch64__)
-#    ifdef __BIG_ENDIAN__
+# elif defined(__APPLE__) && defined(__aarch64__)
   half_size();
-#    else
-  full_size();
-#    endif
-
-#  else
-#    error "Your target system seems to be unsupported."
-#  endif
-
-#elif defined(__powerpc__)
+# elif defined(__arm__) || defined(__aarch64__)
+#   ifdef __BIG_ENDIAN__
   half_size();
-#elif defined(__powepc64__)
-  half_size();
-
-#elif defined(_WIN64)
-
-#  ifdef __x86_64__
+#   else
   full_size();
-#  else
-#    error "Your target system seems to be unsupported."
-#  endif
+#   endif
+# elif defined(__powerpc__) || defined(__powerpc64__)
+  half_size();
+# else
+#   error "Your target system seems to be unsupported."
+# endif
 
 #else
-#  error "Your target system seems to be unsupported."
-#endif
+
+  half_size();
 
 #endif
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124403.427070.patch
Type: text/x-patch
Size: 1517 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220504/37a5f0e8/attachment.bin>


More information about the libcxx-commits mailing list