[libcxx-commits] [libcxx] 569d0cc - [libc++] Remove _LIBCXX_MODULES_BUILD and ext/ headers from header tests

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 3 10:53:38 PST 2022


Author: Nikolas Klauser
Date: 2022-03-03T19:53:23+01:00
New Revision: 569d0cc46dbb981e70983a323cbf8176585451e7

URL: https://github.com/llvm/llvm-project/commit/569d0cc46dbb981e70983a323cbf8176585451e7
DIFF: https://github.com/llvm/llvm-project/commit/569d0cc46dbb981e70983a323cbf8176585451e7.diff

LOG: [libc++] Remove _LIBCXX_MODULES_BUILD and ext/ headers from header tests

Reviewed By: ldionne, Quuxplusone, #libc

Spies: libcxx-commits, arichardson

Differential Revision: https://reviews.llvm.org/D120896

Added: 
    

Modified: 
    libcxx/test/libcxx/clang_tidy.sh.cpp
    libcxx/test/libcxx/double_include.sh.cpp
    libcxx/test/libcxx/min_max_macros.compile.pass.cpp
    libcxx/test/libcxx/nasty_macros.compile.pass.cpp
    libcxx/test/libcxx/no_assert_include.compile.pass.cpp
    libcxx/utils/generate_header_tests.py
    libcxx/utils/libcxx/test/params.py

Removed: 
    


################################################################################
diff  --git a/libcxx/test/libcxx/clang_tidy.sh.cpp b/libcxx/test/libcxx/clang_tidy.sh.cpp
index 1fdad87594f5d..8895719aba559 100644
--- a/libcxx/test/libcxx/clang_tidy.sh.cpp
+++ b/libcxx/test/libcxx/clang_tidy.sh.cpp
@@ -229,12 +229,6 @@
 #    include <experimental/vector>
 #endif // __cplusplus >= 201103L
 
-// extended headers
-#ifndef _LIBCXX_MODULES_BUILD
-#    include <ext/hash_map>
-#    include <ext/hash_set>
-#endif
-
 // clang-format on
 
 ////////////////////////////////////////////////////////////////////////////////

diff  --git a/libcxx/test/libcxx/double_include.sh.cpp b/libcxx/test/libcxx/double_include.sh.cpp
index 3c9acbfa25710..b0ef43a2f2894 100644
--- a/libcxx/test/libcxx/double_include.sh.cpp
+++ b/libcxx/test/libcxx/double_include.sh.cpp
@@ -230,12 +230,6 @@
 #    include <experimental/vector>
 #endif // __cplusplus >= 201103L
 
-// extended headers
-#ifndef _LIBCXX_MODULES_BUILD
-#    include <ext/hash_map>
-#    include <ext/hash_set>
-#endif
-
 // clang-format on
 
 ////////////////////////////////////////////////////////////////////////////////

diff  --git a/libcxx/test/libcxx/min_max_macros.compile.pass.cpp b/libcxx/test/libcxx/min_max_macros.compile.pass.cpp
index ce213281762d3..70b8b141a1c4e 100644
--- a/libcxx/test/libcxx/min_max_macros.compile.pass.cpp
+++ b/libcxx/test/libcxx/min_max_macros.compile.pass.cpp
@@ -365,14 +365,6 @@ TEST_MACROS();
 TEST_MACROS();
 #endif // __cplusplus >= 201103L
 
-// extended headers
-#ifndef _LIBCXX_MODULES_BUILD
-#    include <ext/hash_map>
-TEST_MACROS();
-#    include <ext/hash_set>
-TEST_MACROS();
-#endif
-
 // clang-format on
 
 ////////////////////////////////////////////////////////////////////////////////

diff  --git a/libcxx/test/libcxx/nasty_macros.compile.pass.cpp b/libcxx/test/libcxx/nasty_macros.compile.pass.cpp
index 6f4c999652b56..263daabf3b751 100644
--- a/libcxx/test/libcxx/nasty_macros.compile.pass.cpp
+++ b/libcxx/test/libcxx/nasty_macros.compile.pass.cpp
@@ -340,12 +340,6 @@
 #    include <experimental/vector>
 #endif // __cplusplus >= 201103L
 
-// extended headers
-#ifndef _LIBCXX_MODULES_BUILD
-#    include <ext/hash_map>
-#    include <ext/hash_set>
-#endif
-
 // clang-format on
 
 ////////////////////////////////////////////////////////////////////////////////

diff  --git a/libcxx/test/libcxx/no_assert_include.compile.pass.cpp b/libcxx/test/libcxx/no_assert_include.compile.pass.cpp
index a821b40abac1a..d99c261f0e116 100644
--- a/libcxx/test/libcxx/no_assert_include.compile.pass.cpp
+++ b/libcxx/test/libcxx/no_assert_include.compile.pass.cpp
@@ -225,12 +225,6 @@
 #    include <experimental/vector>
 #endif // __cplusplus >= 201103L
 
-// extended headers
-#ifndef _LIBCXX_MODULES_BUILD
-#    include <ext/hash_map>
-#    include <ext/hash_set>
-#endif
-
 // clang-format on
 
 ////////////////////////////////////////////////////////////////////////////////

diff  --git a/libcxx/utils/generate_header_tests.py b/libcxx/utils/generate_header_tests.py
index 4ddd0c185f296..a7b2f6d2ded03 100755
--- a/libcxx/utils/generate_header_tests.py
+++ b/libcxx/utils/generate_header_tests.py
@@ -91,11 +91,6 @@ def get_libcxx_paths():
 #if __cplusplus >= 201103L
 {experimental_headers}
 #endif // __cplusplus >= 201103L
-
-// extended headers
-#ifndef _LIBCXX_MODULES_BUILD
-{extended_headers}
-#endif
 """
 
 
@@ -193,9 +188,6 @@ def produce_test(test_filename, exclusions=None, post_include=None):
         experimental_headers=produce_experimental_headers(
             post_include=post_include,
         ),
-        extended_headers=produce_extended_headers(
-            post_include=post_include,
-        ),
     )
 
     replace_generated_headers(os.path.join(

diff  --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index 474b1fa523df9..81a7d84a111b1 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -77,7 +77,6 @@ def getStdFlag(cfg, std):
               AddFeature('modules-build'),
               AddCompileFlag('-fmodules'),
               AddCompileFlag('-fcxx-modules'), # AppleClang disregards -fmodules entirely when compiling C++. This enables modules for C++.
-              AddCompileFlag('-D_LIBCXX_MODULES_BUILD') # Needed to exclude headers that are not supported in a modules build
             ] if modules else []),
 
   Parameter(name='enable_exceptions', choices=[True, False], type=bool, default=True,


        


More information about the libcxx-commits mailing list