[libcxx-commits] [PATCH] D136709: [libc++][test] Don't use _LIBCPP macros.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 26 08:42:26 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGe70887ddcfdd: [libc++][test] Don't use _LIBCPP macros. (authored by Mordante).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136709

Files:
  libcxx/test/support/test_format_context.h


Index: libcxx/test/support/test_format_context.h
===================================================================
--- libcxx/test/support/test_format_context.h
+++ libcxx/test/support/test_format_context.h
@@ -32,11 +32,11 @@
 
 #include <format>
 
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#include <locale>
+#ifndef TEST_HAS_NO_LOCALIZATION
+#  include <locale>
 #endif
 
-#if defined(_LIBCPP_VERSION)
+#ifdef _LIBCPP_VERSION
 
 /** Creates a std::basic_format_context as-if the formatting function takes no locale. */
 template <class OutIt, class CharT>
@@ -46,7 +46,7 @@
   return std::__format_context_create(std::move(out_it), args);
 }
 
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#  ifndef TEST_HAS_NO_LOCALIZATION
 /** Creates a std::basic_format_context as-if the formatting function takes locale. */
 template <class OutIt, class CharT>
 std::basic_format_context<OutIt, CharT> test_format_context_create(
@@ -55,10 +55,9 @@
     std::locale loc) {
   return std::__format_context_create(std::move(out_it), args, std::move(loc));
 }
-#endif
-#else
-#error                                                                         \
-    "Please create a vendor specific version of the test functions and file a review at https://reviews.llvm.org/"
-#endif
+#  endif // TEST_HAS_NO_LOCALIZATION
+#else    // _LIBCPP_VERSION
+#  error "Please create a vendor specific version of the test functions and file a review at https://reviews.llvm.org/"
+#endif // _LIBCPP_VERSION
 
 #endif // SUPPORT_TEST_FORMAT_CONTEXT_HPP


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136709.470823.patch
Type: text/x-patch
Size: 1520 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221026/d643ad75/attachment.bin>


More information about the libcxx-commits mailing list