[libcxx-commits] [libcxx] [libc++] Remove <locale> includes from <format> (PR #85478)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Mar 15 15:29:56 PDT 2024
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/85478
This reduces the include time from 767ms to 691ms.
>From 482dcb9375cf98dc6cebd6e8c306eee53570dbcf Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Thu, 7 Mar 2024 16:57:42 +0100
Subject: [PATCH] [libc++] Remove <locale> includes from <format>
This reduces the include time from 767ms to 691ms.
---
libcxx/include/__format/format_context.h | 2 +-
libcxx/include/__format/format_functions.h | 2 +-
libcxx/include/__format/formatter_floating_point.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libcxx/include/__format/format_context.h b/libcxx/include/__format/format_context.h
index d131e942aca60b..bf603c5c62d9db 100644
--- a/libcxx/include/__format/format_context.h
+++ b/libcxx/include/__format/format_context.h
@@ -27,7 +27,7 @@
#include <cstddef>
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-# include <locale>
+# include <__locale>
# include <optional>
#endif
diff --git a/libcxx/include/__format/format_functions.h b/libcxx/include/__format/format_functions.h
index 3ee53539f4ee6c..c7810140105a07 100644
--- a/libcxx/include/__format/format_functions.h
+++ b/libcxx/include/__format/format_functions.h
@@ -41,7 +41,7 @@
#include <string_view>
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-# include <locale>
+# include <__locale>
#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/__format/formatter_floating_point.h b/libcxx/include/__format/formatter_floating_point.h
index f01d323efff5fc..1d94cc349c0dd6 100644
--- a/libcxx/include/__format/formatter_floating_point.h
+++ b/libcxx/include/__format/formatter_floating_point.h
@@ -39,7 +39,7 @@
#include <cstddef>
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-# include <locale>
+# include <__locale>
#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
More information about the libcxx-commits
mailing list