[libcxx-commits] [libcxx] 7b2d592 - [libc++] Fix test FTM header guard
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Dec 11 09:40:47 PST 2024
Author: Louis Dionne
Date: 2024-12-11T12:39:43-05:00
New Revision: 7b2d592a1971fccb8d3cf386d1bc9185b3b1198f
URL: https://github.com/llvm/llvm-project/commit/7b2d592a1971fccb8d3cf386d1bc9185b3b1198f
DIFF: https://github.com/llvm/llvm-project/commit/7b2d592a1971fccb8d3cf386d1bc9185b3b1198f.diff
LOG: [libc++] Fix test FTM header guard
That template is actually not used to generate the version header yet,
but we can at least fix the include guards which are clearly incorrect.
Added:
Modified:
libcxx/test/libcxx/feature_test_macro/version_header.sh.py
libcxx/utils/generate_feature_test_macro_components.py
Removed:
################################################################################
diff --git a/libcxx/test/libcxx/feature_test_macro/version_header.sh.py b/libcxx/test/libcxx/feature_test_macro/version_header.sh.py
index 24d3981f81aebb..1e53d5fd928305 100644
--- a/libcxx/test/libcxx/feature_test_macro/version_header.sh.py
+++ b/libcxx/test/libcxx/feature_test_macro/version_header.sh.py
@@ -30,8 +30,8 @@ def test(output, expected):
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP_VERSION
-#define _LIBCPP_VERSION
+#ifndef _LIBCPP_VERSIONH
+#define _LIBCPP_VERSIONH
#include <__config>
@@ -69,6 +69,6 @@ def test(output, expected):
// define __cpp_lib_missing_FTM_in_older_standard 2026L
#endif // _LIBCPP_STD_VER >= 26
-#endif // _LIBCPP_VERSION
+#endif // _LIBCPP_VERSIONH
""",
)
diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py
index 53fd44291b216a..0b5c0f107134ba 100755
--- a/libcxx/utils/generate_feature_test_macro_components.py
+++ b/libcxx/utils/generate_feature_test_macro_components.py
@@ -2230,8 +2230,8 @@ def version_header(self) -> str:
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP_VERSION
-#define _LIBCPP_VERSION
+#ifndef _LIBCPP_VERSIONH
+#define _LIBCPP_VERSIONH
#include <__config>
@@ -2241,7 +2241,7 @@ def version_header(self) -> str:
{feature_test_macros}
-#endif // _LIBCPP_VERSION
+#endif // _LIBCPP_VERSIONH
"""
return template.format(
feature_test_macros=generate_version_header_implementation(
More information about the libcxx-commits
mailing list