[libc] [llvm] Migrate printf_core libc/src/stdio/ to libc/src/__support. (PR #208303)
Alex Strelnikov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 8 12:56:27 PDT 2026
https://github.com/strel-12 created https://github.com/llvm/llvm-project/pull/208303
[libc] Migrate printf_core from stdio/ to __support/.
The code will be updated and used for wide character printf functions implemented in wchar/, so __support/ is a more consistent shared location.
Assisted-by: Automated tooling, human reviewed.
>From 657b6295a9f308dc61aeb2f62a2f1e6fe2e103c6 Mon Sep 17 00:00:00 2001
From: Alex Strelnikov <strel at google.com>
Date: Wed, 8 Jul 2026 19:45:26 +0000
Subject: [PATCH] Migrate printf_core libc/src/stdio/ to libc/src/__support.
---
libc/fuzzing/stdio/CMakeLists.txt | 2 +-
libc/fuzzing/stdio/printf_parser_fuzz.cpp | 2 +-
libc/src/__support/CMakeLists.txt | 2 +
.../printf_core/CMakeLists.txt | 12 +-
.../printf_core/char_converter.h | 12 +-
.../printf_core/converter.h | 18 +-
.../printf_core/converter_atlas.h | 26 +-
.../printf_core/converter_utils.h | 8 +-
.../printf_core/core_structs.h | 8 +-
.../printf_core/error_mapper.h | 6 +-
.../printf_core/fixed_converter.h | 12 +-
.../printf_core/float_dec_converter.h | 14 +-
.../printf_core/float_dec_converter_limited.h | 12 +-
.../printf_core/float_hex_converter.h | 14 +-
.../printf_core/float_impl.cpp | 2 +-
.../printf_core/float_inf_nan_converter.h | 12 +-
.../printf_core/generic}/CMakeLists.txt | 2 +-
.../printf_core/generic/error_mapper.h | 10 +-
.../printf_core/int_converter.h | 12 +-
.../printf_core/linux}/CMakeLists.txt | 2 +-
.../printf_core/linux/error_mapper.h | 10 +-
.../{stdio => __support}/printf_core/parser.h | 10 +-
.../printf_core/printf_config.h | 6 +-
.../printf_core/printf_main.h | 14 +-
.../printf_core/ptr_converter.h | 14 +-
.../printf_core/strerror_converter.h | 14 +-
.../printf_core/string_converter.h | 12 +-
.../printf_core/vasprintf_internal.h | 11 +-
.../printf_core/vfprintf_internal.h | 12 +-
.../printf_core/write_int_converter.h | 10 +-
.../printf_core/write_modes.def | 0
.../{stdio => __support}/printf_core/writer.h | 10 +-
libc/src/stdio/CMakeLists.txt | 45 +-
libc/src/stdio/asprintf.cpp | 6 +-
libc/src/stdio/asprintf_modular.cpp | 6 +-
libc/src/stdio/baremetal/CMakeLists.txt | 8 +-
libc/src/stdio/baremetal/vfprintf_internal.h | 8 +-
libc/src/stdio/generic/CMakeLists.txt | 6 +-
libc/src/stdio/generic/fprintf.cpp | 6 +-
libc/src/stdio/generic/printf.cpp | 6 +-
libc/src/stdio/generic/vfprintf.cpp | 6 +-
libc/src/stdio/generic/vprintf.cpp | 6 +-
libc/src/stdio/snprintf.cpp | 8 +-
libc/src/stdio/snprintf_modular.cpp | 8 +-
libc/src/stdio/sprintf.cpp | 8 +-
libc/src/stdio/sprintf_modular.cpp | 8 +-
libc/src/stdio/vasprintf.cpp | 6 +-
libc/src/stdio/vasprintf_modular.cpp | 6 +-
libc/src/stdio/vsnprintf.cpp | 8 +-
libc/src/stdio/vsnprintf_modular.cpp | 8 +-
libc/src/stdio/vsprintf.cpp | 8 +-
libc/src/stdio/vsprintf_modular.cpp | 8 +-
libc/src/stdlib/CMakeLists.txt | 12 +-
libc/src/stdlib/str_from_util.h | 6 +-
libc/src/stdlib/strfromd.cpp | 4 +-
libc/src/stdlib/strfromf.cpp | 4 +-
libc/src/stdlib/strfroml.cpp | 4 +-
libc/src/time/CMakeLists.txt | 4 +-
libc/src/time/strftime.cpp | 2 +-
libc/src/time/strftime_core/CMakeLists.txt | 4 +-
.../time/strftime_core/composite_converter.h | 2 +-
libc/src/time/strftime_core/converter.h | 2 +-
libc/src/time/strftime_core/num_converter.h | 2 +-
libc/src/time/strftime_core/str_converter.h | 2 +-
libc/src/time/strftime_core/strftime_main.h | 2 +-
libc/src/time/strftime_l.cpp | 2 +-
libc/test/UnitTest/CMakeLists.txt | 4 +-
libc/test/UnitTest/PrintfMatcher.cpp | 4 +-
libc/test/UnitTest/PrintfMatcher.h | 2 +-
libc/test/shared/CMakeLists.txt | 6 +-
libc/test/src/__support/CMakeLists.txt | 1 +
.../printf_core/CMakeLists.txt | 18 +-
.../printf_core/converter_test.cpp | 6 +-
.../printf_core/parser_test.cpp | 2 +-
.../printf_core/writer_test.cpp | 2 +-
libc/test/src/stdio/CMakeLists.txt | 3 +-
libc/test/src/stdio/sprintf_test.cpp | 2 +-
.../llvm-project-overlay/libc/BUILD.bazel | 436 +++++++++---------
.../libc/test/src/__support/BUILD.bazel | 37 ++
.../libc/test/src/stdio/BUILD.bazel | 37 --
80 files changed, 554 insertions(+), 548 deletions(-)
rename libc/src/{stdio => __support}/printf_core/CMakeLists.txt (93%)
rename libc/src/{stdio => __support}/printf_core/char_converter.h (87%)
rename libc/src/{stdio => __support}/printf_core/converter.h (89%)
rename libc/src/{stdio => __support}/printf_core/converter_atlas.h (62%)
rename libc/src/{stdio => __support}/printf_core/converter_utils.h (92%)
rename libc/src/{stdio => __support}/printf_core/core_structs.h (95%)
rename libc/src/{stdio => __support}/printf_core/error_mapper.h (76%)
rename libc/src/{stdio => __support}/printf_core/fixed_converter.h (97%)
rename libc/src/{stdio => __support}/printf_core/float_dec_converter.h (99%)
rename libc/src/{stdio => __support}/printf_core/float_dec_converter_limited.h (98%)
rename libc/src/{stdio => __support}/printf_core/float_hex_converter.h (96%)
rename libc/src/{stdio => __support}/printf_core/float_impl.cpp (94%)
rename libc/src/{stdio => __support}/printf_core/float_inf_nan_converter.h (90%)
rename libc/src/{stdio/printf_core/linux => __support/printf_core/generic}/CMakeLists.txt (67%)
rename libc/src/{stdio => __support}/printf_core/generic/error_mapper.h (79%)
rename libc/src/{stdio => __support}/printf_core/int_converter.h (95%)
rename libc/src/{stdio/printf_core/generic => __support/printf_core/linux}/CMakeLists.txt (67%)
rename libc/src/{stdio => __support}/printf_core/linux/error_mapper.h (82%)
rename libc/src/{stdio => __support}/printf_core/parser.h (99%)
rename libc/src/{stdio => __support}/printf_core/printf_config.h (94%)
rename libc/src/{stdio => __support}/printf_core/printf_main.h (81%)
rename libc/src/{stdio => __support}/printf_core/ptr_converter.h (76%)
rename libc/src/{stdio => __support}/printf_core/strerror_converter.h (87%)
rename libc/src/{stdio => __support}/printf_core/string_converter.h (92%)
rename libc/src/{stdio => __support}/printf_core/vasprintf_internal.h (87%)
rename libc/src/{stdio => __support}/printf_core/vfprintf_internal.h (91%)
rename libc/src/{stdio => __support}/printf_core/write_int_converter.h (88%)
rename libc/src/{stdio => __support}/printf_core/write_modes.def (100%)
rename libc/src/{stdio => __support}/printf_core/writer.h (97%)
rename libc/test/src/{stdio => __support}/printf_core/CMakeLists.txt (56%)
rename libc/test/src/{stdio => __support}/printf_core/converter_test.cpp (98%)
rename libc/test/src/{stdio => __support}/printf_core/parser_test.cpp (99%)
rename libc/test/src/{stdio => __support}/printf_core/writer_test.cpp (99%)
diff --git a/libc/fuzzing/stdio/CMakeLists.txt b/libc/fuzzing/stdio/CMakeLists.txt
index 401785a30469c..86f095e84737e 100644
--- a/libc/fuzzing/stdio/CMakeLists.txt
+++ b/libc/fuzzing/stdio/CMakeLists.txt
@@ -3,7 +3,7 @@ add_libc_fuzzer(
SRCS
printf_parser_fuzz.cpp
DEPENDS
- libc.src.stdio.printf_core.parser
+ libc.src.__support.printf_core.parser
libc.src.errno.errno # needed for the strerror conversion
)
diff --git a/libc/fuzzing/stdio/printf_parser_fuzz.cpp b/libc/fuzzing/stdio/printf_parser_fuzz.cpp
index e745850bd6c3a..71da37d470fa8 100644
--- a/libc/fuzzing/stdio/printf_parser_fuzz.cpp
+++ b/libc/fuzzing/stdio/printf_parser_fuzz.cpp
@@ -11,7 +11,7 @@
//===----------------------------------------------------------------------===//
#include "src/__support/arg_list.h"
-#include "src/stdio/printf_core/parser.h"
+#include "src/__support/printf_core/parser.h"
#include <stdarg.h>
#include <stdint.h>
diff --git a/libc/src/__support/CMakeLists.txt b/libc/src/__support/CMakeLists.txt
index f4cb283976bc3..12761e6a524b9 100644
--- a/libc/src/__support/CMakeLists.txt
+++ b/libc/src/__support/CMakeLists.txt
@@ -462,6 +462,8 @@ add_subdirectory(threads)
add_subdirectory(File)
+add_subdirectory(printf_core)
+
add_subdirectory(HashTable)
add_subdirectory(fixed_point)
diff --git a/libc/src/stdio/printf_core/CMakeLists.txt b/libc/src/__support/printf_core/CMakeLists.txt
similarity index 93%
rename from libc/src/stdio/printf_core/CMakeLists.txt
rename to libc/src/__support/printf_core/CMakeLists.txt
index 4d6f25a2ddd00..e85841f806e10 100644
--- a/libc/src/stdio/printf_core/CMakeLists.txt
+++ b/libc/src/__support/printf_core/CMakeLists.txt
@@ -41,9 +41,9 @@ else()
add_subdirectory(generic)
endif()
-set(target_error_mapper libc.src.stdio.printf_core.${LIBC_TARGET_OS}.error_mapper)
+set(target_error_mapper libc.src.__support.printf_core.${LIBC_TARGET_OS}.error_mapper)
if(NOT TARGET ${target_error_mapper})
- set(target_error_mapper libc.src.stdio.printf_core.generic.error_mapper)
+ set(target_error_mapper libc.src.__support.printf_core.generic.error_mapper)
endif()
if(LIBC_CONF_PRINTF_DISABLE_WIDE)
@@ -178,8 +178,8 @@ add_header_library(
libc.hdr.func.realloc
libc.src.__support.arg_list
libc.src.__support.error_or
- libc.src.stdio.printf_core.printf_main
- libc.src.stdio.printf_core.writer
+ libc.src.__support.printf_core.printf_main
+ libc.src.__support.printf_core.writer
)
add_header_library(
@@ -205,8 +205,8 @@ add_header_library(
libc.src.__support.File.file
libc.src.__support.error_or
libc.src.__support.arg_list
- libc.src.stdio.printf_core.printf_main
- libc.src.stdio.printf_core.writer
+ libc.src.__support.printf_core.printf_main
+ libc.src.__support.printf_core.writer
${use_system_file}
)
diff --git a/libc/src/stdio/printf_core/char_converter.h b/libc/src/__support/printf_core/char_converter.h
similarity index 87%
rename from libc/src/stdio/printf_core/char_converter.h
rename to libc/src/__support/printf_core/char_converter.h
index e4792c3b23b9f..59f3e22f7ce50 100644
--- a/libc/src/stdio/printf_core/char_converter.h
+++ b/libc/src/__support/printf_core/char_converter.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_CHAR_CONVERTER_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_CHAR_CONVERTER_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_CHAR_CONVERTER_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_CHAR_CONVERTER_H
#ifndef LIBC_COPT_PRINTF_DISABLE_WIDE
#include "hdr/types/wchar_t.h"
@@ -19,9 +19,9 @@
#include "hdr/limits_macros.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/converter_utils.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/converter_utils.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/writer.h"
namespace LIBC_NAMESPACE_DECL {
namespace printf_core {
@@ -85,4 +85,4 @@ LIBC_INLINE int convert_char(Writer<write_mode> *writer,
} // namespace printf_core
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_CHAR_CONVERTER_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_CHAR_CONVERTER_H
diff --git a/libc/src/stdio/printf_core/converter.h b/libc/src/__support/printf_core/converter.h
similarity index 89%
rename from libc/src/stdio/printf_core/converter.h
rename to libc/src/__support/printf_core/converter.h
index e931d6c34db68..67d0ee3d42b61 100644
--- a/libc/src/stdio/printf_core/converter.h
+++ b/libc/src/__support/printf_core/converter.h
@@ -6,19 +6,19 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_CONVERTER_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_CONVERTER_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_CONVERTER_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_CONVERTER_H
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/printf_config.h"
-#include "src/stdio/printf_core/strerror_converter.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/printf_config.h"
+#include "src/__support/printf_core/strerror_converter.h"
+#include "src/__support/printf_core/writer.h"
// This option allows for replacing all of the conversion functions with custom
// replacements. This allows conversions to be replaced at compile time.
#ifndef LIBC_COPT_PRINTF_CONV_ATLAS
-#include "src/stdio/printf_core/converter_atlas.h"
+#include "src/__support/printf_core/converter_atlas.h"
#else
#include LIBC_COPT_PRINTF_CONV_ATLAS
#endif
@@ -55,7 +55,7 @@ LIBC_PRINTF_MODULE((template <WriteMode write_mode>
#define HANDLE_WRITE_MODE(MODE) \
template int convert_float<WriteMode::MODE>( \
Writer<WriteMode::MODE> * writer, const FormatSection &to_conv);
-#include "src/stdio/printf_core/write_modes.def"
+#include "src/__support/printf_core/write_modes.def"
#undef HANDLE_WRITE_MODE
#endif // LIBC_PRINTF_DEFINE_MODULES
@@ -137,4 +137,4 @@ int convert(Writer<write_mode> *writer, const FormatSection &to_conv) {
} // namespace printf_core
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_CONVERTER_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_CONVERTER_H
diff --git a/libc/src/stdio/printf_core/converter_atlas.h b/libc/src/__support/printf_core/converter_atlas.h
similarity index 62%
rename from libc/src/stdio/printf_core/converter_atlas.h
rename to libc/src/__support/printf_core/converter_atlas.h
index dfb91b30e80f8..e60df06cbac05 100644
--- a/libc/src/stdio/printf_core/converter_atlas.h
+++ b/libc/src/__support/printf_core/converter_atlas.h
@@ -10,46 +10,46 @@
// just replace the #include, additionally it keeps the ifdefs out of the
// converter header.
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_CONVERTER_ATLAS_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_CONVERTER_ATLAS_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_CONVERTER_ATLAS_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_CONVERTER_ATLAS_H
// defines convert_string
-#include "src/stdio/printf_core/string_converter.h"
+#include "src/__support/printf_core/string_converter.h"
// defines convert_char
-#include "src/stdio/printf_core/char_converter.h"
+#include "src/__support/printf_core/char_converter.h"
// defines convert_int
-#include "src/stdio/printf_core/int_converter.h"
+#include "src/__support/printf_core/int_converter.h"
#ifndef LIBC_COPT_PRINTF_DISABLE_FLOAT
// defines convert_float_decimal
// defines convert_float_dec_exp
// defines convert_float_dec_auto
#ifdef LIBC_COPT_FLOAT_TO_STR_USE_FLOAT320
-#include "src/stdio/printf_core/float_dec_converter_limited.h"
+#include "src/__support/printf_core/float_dec_converter_limited.h"
#else
-#include "src/stdio/printf_core/float_dec_converter.h"
+#include "src/__support/printf_core/float_dec_converter.h"
#endif
// defines convert_float_hex_exp
-#include "src/stdio/printf_core/float_hex_converter.h"
+#include "src/__support/printf_core/float_hex_converter.h"
#endif // LIBC_COPT_PRINTF_DISABLE_FLOAT
#ifdef LIBC_INTERNAL_PRINTF_HAS_FIXED_POINT
// defines convert_fixed
-#include "src/stdio/printf_core/fixed_converter.h"
+#include "src/__support/printf_core/fixed_converter.h"
#endif // LIBC_INTERNAL_PRINTF_HAS_FIXED_POINT
#ifndef LIBC_COPT_PRINTF_DISABLE_WRITE_INT
-#include "src/stdio/printf_core/write_int_converter.h"
+#include "src/__support/printf_core/write_int_converter.h"
#endif // LIBC_COPT_PRINTF_DISABLE_WRITE_INT
// defines convert_pointer
-#include "src/stdio/printf_core/ptr_converter.h"
+#include "src/__support/printf_core/ptr_converter.h"
#ifndef LIBC_COPT_PRINTF_DISABLE_STRERROR
// defines convert_strerror
-#include "src/stdio/printf_core/strerror_converter.h"
+#include "src/__support/printf_core/strerror_converter.h"
#endif // LIBC_COPT_PRINTF_DISABLE_STRERROR
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_CONVERTER_ATLAS_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_CONVERTER_ATLAS_H
diff --git a/libc/src/stdio/printf_core/converter_utils.h b/libc/src/__support/printf_core/converter_utils.h
similarity index 92%
rename from libc/src/stdio/printf_core/converter_utils.h
rename to libc/src/__support/printf_core/converter_utils.h
index b27defddc354f..a21fb70f2f62a 100644
--- a/libc/src/stdio/printf_core/converter_utils.h
+++ b/libc/src/__support/printf_core/converter_utils.h
@@ -6,12 +6,12 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_CONVERTER_UTILS_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_CONVERTER_UTILS_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_CONVERTER_UTILS_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_CONVERTER_UTILS_H
#include "src/__support/CPP/limits.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
+#include "src/__support/printf_core/core_structs.h"
#include <inttypes.h>
#include <stddef.h>
@@ -78,4 +78,4 @@ enum class RoundDirection { Up, Down, Even };
} // namespace printf_core
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_CONVERTER_UTILS_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_CONVERTER_UTILS_H
diff --git a/libc/src/stdio/printf_core/core_structs.h b/libc/src/__support/printf_core/core_structs.h
similarity index 95%
rename from libc/src/stdio/printf_core/core_structs.h
rename to libc/src/__support/printf_core/core_structs.h
index 9b74a0a391f95..3107b9ce46f00 100644
--- a/libc/src/stdio/printf_core/core_structs.h
+++ b/libc/src/__support/printf_core/core_structs.h
@@ -6,15 +6,15 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_CORE_STRUCTS_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_CORE_STRUCTS_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_CORE_STRUCTS_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_CORE_STRUCTS_H
#include "src/__support/macros/config.h"
#include "src/__support/CPP/string_view.h"
#include "src/__support/CPP/type_traits.h"
#include "src/__support/FPUtil/FPBits.h"
-#include "src/stdio/printf_core/printf_config.h"
+#include "src/__support/printf_core/printf_config.h"
#include <inttypes.h>
#include <stddef.h>
@@ -165,4 +165,4 @@ constexpr int MB_CONVERSION_ERROR = -1009;
} // namespace printf_core
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_CORE_STRUCTS_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_CORE_STRUCTS_H
diff --git a/libc/src/stdio/printf_core/error_mapper.h b/libc/src/__support/printf_core/error_mapper.h
similarity index 76%
rename from libc/src/stdio/printf_core/error_mapper.h
rename to libc/src/__support/printf_core/error_mapper.h
index 23030930133a1..143ea94ce8963 100644
--- a/libc/src/stdio/printf_core/error_mapper.h
+++ b/libc/src/__support/printf_core/error_mapper.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_ERROR_MAPPER_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_ERROR_MAPPER_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_ERROR_MAPPER_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_ERROR_MAPPER_H
#include "src/__support/macros/properties/architectures.h"
@@ -18,4 +18,4 @@
#include "generic/error_mapper.h"
#endif
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_ERROR_MAPPER_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_ERROR_MAPPER_H
diff --git a/libc/src/stdio/printf_core/fixed_converter.h b/libc/src/__support/printf_core/fixed_converter.h
similarity index 97%
rename from libc/src/stdio/printf_core/fixed_converter.h
rename to libc/src/__support/printf_core/fixed_converter.h
index e8a3314967562..76b2d0d63644f 100644
--- a/libc/src/stdio/printf_core/fixed_converter.h
+++ b/libc/src/__support/printf_core/fixed_converter.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_FIXED_CONVERTER_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_FIXED_CONVERTER_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_FIXED_CONVERTER_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_FIXED_CONVERTER_H
#include "include/llvm-libc-macros/stdfix-macros.h"
#include "src/__support/CPP/string_view.h"
@@ -17,9 +17,9 @@
#include "src/__support/integer_to_string.h"
#include "src/__support/libc_assert.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/converter_utils.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/converter_utils.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/writer.h"
#include <inttypes.h>
#include <stddef.h>
@@ -307,4 +307,4 @@ LIBC_INLINE int convert_fixed(Writer<write_mode> *writer,
} // namespace printf_core
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_FIXED_CONVERTER_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_FIXED_CONVERTER_H
diff --git a/libc/src/stdio/printf_core/float_dec_converter.h b/libc/src/__support/printf_core/float_dec_converter.h
similarity index 99%
rename from libc/src/stdio/printf_core/float_dec_converter.h
rename to libc/src/__support/printf_core/float_dec_converter.h
index 7d86de3692115..b678cd29cdb81 100644
--- a/libc/src/stdio/printf_core/float_dec_converter.h
+++ b/libc/src/__support/printf_core/float_dec_converter.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_FLOAT_DEC_CONVERTER_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_FLOAT_DEC_CONVERTER_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_FLOAT_DEC_CONVERTER_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_FLOAT_DEC_CONVERTER_H
#include "src/__support/CPP/string_view.h"
#include "src/__support/FPUtil/FPBits.h"
@@ -18,10 +18,10 @@
#include "src/__support/integer_to_string.h"
#include "src/__support/libc_assert.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/converter_utils.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/float_inf_nan_converter.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/converter_utils.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/float_inf_nan_converter.h"
+#include "src/__support/printf_core/writer.h"
#include <inttypes.h>
#include <stddef.h>
@@ -1245,4 +1245,4 @@ LIBC_INLINE int convert_float_dec_auto(Writer<write_mode> *writer,
} // namespace printf_core
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_FLOAT_DEC_CONVERTER_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_FLOAT_DEC_CONVERTER_H
diff --git a/libc/src/stdio/printf_core/float_dec_converter_limited.h b/libc/src/__support/printf_core/float_dec_converter_limited.h
similarity index 98%
rename from libc/src/stdio/printf_core/float_dec_converter_limited.h
rename to libc/src/__support/printf_core/float_dec_converter_limited.h
index 2693ebd531f96..2e34004ce92ca 100644
--- a/libc/src/stdio/printf_core/float_dec_converter_limited.h
+++ b/libc/src/__support/printf_core/float_dec_converter_limited.h
@@ -38,8 +38,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_FLOAT_DEC_CONVERTER_LIMITED_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_FLOAT_DEC_CONVERTER_LIMITED_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_FLOAT_DEC_CONVERTER_LIMITED_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_FLOAT_DEC_CONVERTER_LIMITED_H
#include "src/__support/CPP/algorithm.h"
#include "src/__support/CPP/string.h"
@@ -50,9 +50,9 @@
#include "src/__support/integer_to_string.h"
#include "src/__support/libc_assert.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/float_inf_nan_converter.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/float_inf_nan_converter.h"
+#include "src/__support/printf_core/writer.h"
#include "src/string/memory_utils/inline_memcpy.h"
namespace LIBC_NAMESPACE_DECL {
@@ -711,4 +711,4 @@ LIBC_INLINE int convert_float_dec_auto(Writer<write_mode> *writer,
} // namespace printf_core
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_FLOAT_DEC_CONVERTER_LIMITED_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_FLOAT_DEC_CONVERTER_LIMITED_H
diff --git a/libc/src/stdio/printf_core/float_hex_converter.h b/libc/src/__support/printf_core/float_hex_converter.h
similarity index 96%
rename from libc/src/stdio/printf_core/float_hex_converter.h
rename to libc/src/__support/printf_core/float_hex_converter.h
index 6ac3bfac8a76e..640db7be2c0f4 100644
--- a/libc/src/stdio/printf_core/float_hex_converter.h
+++ b/libc/src/__support/printf_core/float_hex_converter.h
@@ -6,18 +6,18 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_FLOAT_HEX_CONVERTER_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_FLOAT_HEX_CONVERTER_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_FLOAT_HEX_CONVERTER_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_FLOAT_HEX_CONVERTER_H
#include "src/__support/CPP/string_view.h"
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/FPUtil/rounding_mode.h"
#include "src/__support/ctype_utils.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/converter_utils.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/float_inf_nan_converter.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/converter_utils.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/float_inf_nan_converter.h"
+#include "src/__support/printf_core/writer.h"
#include <inttypes.h>
#include <stddef.h>
@@ -298,4 +298,4 @@ LIBC_INLINE int convert_float_hex_exp(Writer<write_mode> *writer,
} // namespace printf_core
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_FLOAT_HEX_CONVERTER_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_FLOAT_HEX_CONVERTER_H
diff --git a/libc/src/stdio/printf_core/float_impl.cpp b/libc/src/__support/printf_core/float_impl.cpp
similarity index 94%
rename from libc/src/stdio/printf_core/float_impl.cpp
rename to libc/src/__support/printf_core/float_impl.cpp
index 92a616b955def..7e8fc6d983325 100644
--- a/libc/src/stdio/printf_core/float_impl.cpp
+++ b/libc/src/__support/printf_core/float_impl.cpp
@@ -16,7 +16,7 @@
#ifdef LIBC_COPT_PRINTF_MODULAR
#define LIBC_PRINTF_DEFINE_MODULES
-#include "src/stdio/printf_core/converter.h"
+#include "src/__support/printf_core/converter.h"
// Bring this file into the link if __printf_float is referenced.
extern "C" void __printf_float() {}
diff --git a/libc/src/stdio/printf_core/float_inf_nan_converter.h b/libc/src/__support/printf_core/float_inf_nan_converter.h
similarity index 90%
rename from libc/src/stdio/printf_core/float_inf_nan_converter.h
rename to libc/src/__support/printf_core/float_inf_nan_converter.h
index 2af2c7feee336..81769ae4b4913 100644
--- a/libc/src/stdio/printf_core/float_inf_nan_converter.h
+++ b/libc/src/__support/printf_core/float_inf_nan_converter.h
@@ -6,15 +6,15 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_FLOAT_INF_NAN_CONVERTER_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_FLOAT_INF_NAN_CONVERTER_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_FLOAT_INF_NAN_CONVERTER_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_FLOAT_INF_NAN_CONVERTER_H
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/ctype_utils.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/converter_utils.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/converter_utils.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/writer.h"
#include <inttypes.h>
#include <stddef.h>
@@ -99,4 +99,4 @@ LIBC_INLINE int convert_inf_nan(Writer<write_mode> *writer,
} // namespace printf_core
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_FLOAT_INF_NAN_CONVERTER_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_FLOAT_INF_NAN_CONVERTER_H
diff --git a/libc/src/stdio/printf_core/linux/CMakeLists.txt b/libc/src/__support/printf_core/generic/CMakeLists.txt
similarity index 67%
rename from libc/src/stdio/printf_core/linux/CMakeLists.txt
rename to libc/src/__support/printf_core/generic/CMakeLists.txt
index 2f0143d992e31..a4533c816a684 100644
--- a/libc/src/stdio/printf_core/linux/CMakeLists.txt
+++ b/libc/src/__support/printf_core/generic/CMakeLists.txt
@@ -3,6 +3,6 @@ add_header_library(
HDRS
error_mapper.h
DEPENDS
- libc.src.stdio.printf_core.core_structs
+ libc.src.__support.printf_core.core_structs
libc.hdr.errno_macros
)
diff --git a/libc/src/stdio/printf_core/generic/error_mapper.h b/libc/src/__support/printf_core/generic/error_mapper.h
similarity index 79%
rename from libc/src/stdio/printf_core/generic/error_mapper.h
rename to libc/src/__support/printf_core/generic/error_mapper.h
index d8cdd2cc2dbaa..a3f355b531b33 100644
--- a/libc/src/stdio/printf_core/generic/error_mapper.h
+++ b/libc/src/__support/printf_core/generic/error_mapper.h
@@ -6,12 +6,12 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_GENERIC_ERROR_MAPPER_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_GENERIC_ERROR_MAPPER_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_GENERIC_ERROR_MAPPER_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_GENERIC_ERROR_MAPPER_H
#include "hdr/errno_macros.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
namespace LIBC_NAMESPACE_DECL {
namespace printf_core {
@@ -46,4 +46,4 @@ LIBC_INLINE static int internal_error_to_errno(int internal_error) {
} // namespace printf_core
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_GENERIC_ERROR_MAPPER_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_GENERIC_ERROR_MAPPER_H
diff --git a/libc/src/stdio/printf_core/int_converter.h b/libc/src/__support/printf_core/int_converter.h
similarity index 95%
rename from libc/src/stdio/printf_core/int_converter.h
rename to libc/src/__support/printf_core/int_converter.h
index 11234c32ce997..c40c742e41c35 100644
--- a/libc/src/stdio/printf_core/int_converter.h
+++ b/libc/src/__support/printf_core/int_converter.h
@@ -6,17 +6,17 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_INT_CONVERTER_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_INT_CONVERTER_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_INT_CONVERTER_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_INT_CONVERTER_H
#include "src/__support/CPP/span.h"
#include "src/__support/CPP/string_view.h"
#include "src/__support/ctype_utils.h"
#include "src/__support/integer_to_string.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/converter_utils.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/converter_utils.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/writer.h"
#include <inttypes.h>
#include <stddef.h>
@@ -209,4 +209,4 @@ LIBC_INLINE int convert_int(Writer<write_mode> *writer,
} // namespace printf_core
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_INT_CONVERTER_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_INT_CONVERTER_H
diff --git a/libc/src/stdio/printf_core/generic/CMakeLists.txt b/libc/src/__support/printf_core/linux/CMakeLists.txt
similarity index 67%
rename from libc/src/stdio/printf_core/generic/CMakeLists.txt
rename to libc/src/__support/printf_core/linux/CMakeLists.txt
index 2f0143d992e31..a4533c816a684 100644
--- a/libc/src/stdio/printf_core/generic/CMakeLists.txt
+++ b/libc/src/__support/printf_core/linux/CMakeLists.txt
@@ -3,6 +3,6 @@ add_header_library(
HDRS
error_mapper.h
DEPENDS
- libc.src.stdio.printf_core.core_structs
+ libc.src.__support.printf_core.core_structs
libc.hdr.errno_macros
)
diff --git a/libc/src/stdio/printf_core/linux/error_mapper.h b/libc/src/__support/printf_core/linux/error_mapper.h
similarity index 82%
rename from libc/src/stdio/printf_core/linux/error_mapper.h
rename to libc/src/__support/printf_core/linux/error_mapper.h
index 3449f12593469..db8cddcd11f66 100644
--- a/libc/src/stdio/printf_core/linux/error_mapper.h
+++ b/libc/src/__support/printf_core/linux/error_mapper.h
@@ -6,12 +6,12 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_LINUX_ERROR_MAPPER_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_LINUX_ERROR_MAPPER_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_LINUX_ERROR_MAPPER_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_LINUX_ERROR_MAPPER_H
#include "hdr/errno_macros.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
namespace LIBC_NAMESPACE_DECL {
namespace printf_core {
@@ -54,4 +54,4 @@ LIBC_INLINE static int internal_error_to_errno(int internal_error) {
} // namespace printf_core
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_LINUX_ERROR_MAPPER_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_LINUX_ERROR_MAPPER_H
diff --git a/libc/src/stdio/printf_core/parser.h b/libc/src/__support/printf_core/parser.h
similarity index 99%
rename from libc/src/stdio/printf_core/parser.h
rename to libc/src/__support/printf_core/parser.h
index 369358882b621..384c20a275af2 100644
--- a/libc/src/stdio/printf_core/parser.h
+++ b/libc/src/__support/printf_core/parser.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_PARSER_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_PARSER_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_PARSER_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_PARSER_H
#include "include/llvm-libc-macros/stdfix-macros.h"
#include "src/__support/CPP/algorithm.h" // max
@@ -17,8 +17,8 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h"
#include "src/__support/str_to_integer.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/printf_config.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/printf_config.h"
#include <stddef.h>
@@ -758,4 +758,4 @@ template <typename ArgProvider> class Parser {
} // namespace printf_core
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_PARSER_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_PARSER_H
diff --git a/libc/src/stdio/printf_core/printf_config.h b/libc/src/__support/printf_core/printf_config.h
similarity index 94%
rename from libc/src/stdio/printf_core/printf_config.h
rename to libc/src/__support/printf_core/printf_config.h
index 929b1c5b3931f..0cf983f10d096 100644
--- a/libc/src/stdio/printf_core/printf_config.h
+++ b/libc/src/__support/printf_core/printf_config.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_PRINTF_CONFIG_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_PRINTF_CONFIG_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_PRINTF_CONFIG_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_PRINTF_CONFIG_H
// The index array buffer is always initialized when printf is called. In cases
// where index mode is necessary but memory is limited, or when index mode
@@ -73,4 +73,4 @@
LIBC_PRINTF_MODULE_UNWRAP SIG LIBC_PRINTF_MODULE_DECL;
#endif
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_PRINTF_CONFIG_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_PRINTF_CONFIG_H
diff --git a/libc/src/stdio/printf_core/printf_main.h b/libc/src/__support/printf_core/printf_main.h
similarity index 81%
rename from libc/src/stdio/printf_core/printf_main.h
rename to libc/src/__support/printf_core/printf_main.h
index 874c24464ed52..b08e05be25303 100644
--- a/libc/src/stdio/printf_core/printf_main.h
+++ b/libc/src/__support/printf_core/printf_main.h
@@ -6,16 +6,16 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_PRINTF_MAIN_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_PRINTF_MAIN_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_PRINTF_MAIN_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_PRINTF_MAIN_H
#include "src/__support/arg_list.h"
#include "src/__support/error_or.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/converter.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/parser.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/converter.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/parser.h"
+#include "src/__support/printf_core/writer.h"
#include <stddef.h>
@@ -55,4 +55,4 @@ ErrorOr<size_t> printf_main(Writer<write_mode> *writer,
} // namespace printf_core
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_PRINTF_MAIN_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_PRINTF_MAIN_H
diff --git a/libc/src/stdio/printf_core/ptr_converter.h b/libc/src/__support/printf_core/ptr_converter.h
similarity index 76%
rename from libc/src/stdio/printf_core/ptr_converter.h
rename to libc/src/__support/printf_core/ptr_converter.h
index c2a74e3043e6f..692933a63f38b 100644
--- a/libc/src/stdio/printf_core/ptr_converter.h
+++ b/libc/src/__support/printf_core/ptr_converter.h
@@ -6,14 +6,14 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_PTR_CONVERTER_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_PTR_CONVERTER_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_PTR_CONVERTER_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_PTR_CONVERTER_H
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/int_converter.h"
-#include "src/stdio/printf_core/string_converter.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/int_converter.h"
+#include "src/__support/printf_core/string_converter.h"
+#include "src/__support/printf_core/writer.h"
namespace LIBC_NAMESPACE_DECL {
namespace printf_core {
@@ -40,4 +40,4 @@ LIBC_INLINE int convert_pointer(Writer<write_mode> *writer,
} // namespace printf_core
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_PTR_CONVERTER_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_PTR_CONVERTER_H
diff --git a/libc/src/stdio/printf_core/strerror_converter.h b/libc/src/__support/printf_core/strerror_converter.h
similarity index 87%
rename from libc/src/stdio/printf_core/strerror_converter.h
rename to libc/src/__support/printf_core/strerror_converter.h
index 2cd6df0c01d45..ec02a9a52f99a 100644
--- a/libc/src/stdio/printf_core/strerror_converter.h
+++ b/libc/src/__support/printf_core/strerror_converter.h
@@ -6,15 +6,15 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_STRERROR_CONVERTER_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_STRERROR_CONVERTER_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_STRERROR_CONVERTER_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_STRERROR_CONVERTER_H
#include "src/__support/StringUtil/error_to_string.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/int_converter.h"
-#include "src/stdio/printf_core/string_converter.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/int_converter.h"
+#include "src/__support/printf_core/string_converter.h"
+#include "src/__support/printf_core/writer.h"
namespace LIBC_NAMESPACE_DECL {
namespace printf_core {
@@ -73,4 +73,4 @@ LIBC_INLINE int convert_strerror(Writer<write_mode> *writer,
} // namespace printf_core
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_STRERROR_CONVERTER_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_STRERROR_CONVERTER_H
diff --git a/libc/src/stdio/printf_core/string_converter.h b/libc/src/__support/printf_core/string_converter.h
similarity index 92%
rename from libc/src/stdio/printf_core/string_converter.h
rename to libc/src/__support/printf_core/string_converter.h
index 2f521544785c0..4cd1d52a2bab5 100644
--- a/libc/src/stdio/printf_core/string_converter.h
+++ b/libc/src/__support/printf_core/string_converter.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_STRING_CONVERTER_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_STRING_CONVERTER_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_STRING_CONVERTER_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_STRING_CONVERTER_H
#ifndef LIBC_COPT_PRINTF_DISABLE_WIDE
#include "hdr/types/char32_t.h"
@@ -17,9 +17,9 @@
#endif // LIBC_COPT_PRINTF_DISABLE_WIDE
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/converter_utils.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/converter_utils.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/writer.h"
#include "src/string/string_utils.h" // string_length
#include <stddef.h>
@@ -142,4 +142,4 @@ LIBC_INLINE int convert_string(Writer<write_mode> *writer,
} // namespace printf_core
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_STRING_CONVERTER_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_STRING_CONVERTER_H
diff --git a/libc/src/stdio/printf_core/vasprintf_internal.h b/libc/src/__support/printf_core/vasprintf_internal.h
similarity index 87%
rename from libc/src/stdio/printf_core/vasprintf_internal.h
rename to libc/src/__support/printf_core/vasprintf_internal.h
index fe5428e6118dc..969da6ebc46bb 100644
--- a/libc/src/stdio/printf_core/vasprintf_internal.h
+++ b/libc/src/__support/printf_core/vasprintf_internal.h
@@ -6,14 +6,17 @@
//
//===----------------------------------------------------------------------===//
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_VASPRINTF_INTERNAL_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_VASPRINTF_INTERNAL_H
+
#include "hdr/func/free.h"
#include "hdr/func/malloc.h"
#include "hdr/func/realloc.h"
#include "src/__support/arg_list.h"
#include "src/__support/error_or.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/printf_main.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/printf_main.h"
+#include "src/__support/printf_core/writer.h"
namespace LIBC_NAMESPACE_DECL {
namespace printf_core {
@@ -73,3 +76,5 @@ LIBC_INLINE ErrorOr<size_t> vasprintf_internal(char **ret,
}
} // namespace printf_core
} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_VASPRINTF_INTERNAL_H
diff --git a/libc/src/stdio/printf_core/vfprintf_internal.h b/libc/src/__support/printf_core/vfprintf_internal.h
similarity index 91%
rename from libc/src/stdio/printf_core/vfprintf_internal.h
rename to libc/src/__support/printf_core/vfprintf_internal.h
index 321b0693ad339..6a62e966f7ff6 100644
--- a/libc/src/stdio/printf_core/vfprintf_internal.h
+++ b/libc/src/__support/printf_core/vfprintf_internal.h
@@ -6,17 +6,17 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_VFPRINTF_INTERNAL_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_VFPRINTF_INTERNAL_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_VFPRINTF_INTERNAL_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_VFPRINTF_INTERNAL_H
#include "src/__support/File/file.h"
#include "src/__support/arg_list.h"
#include "src/__support/error_or.h"
#include "src/__support/macros/attributes.h" // For LIBC_INLINE
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/printf_main.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/printf_main.h"
+#include "src/__support/printf_core/writer.h"
#include "hdr/types/FILE.h"
@@ -105,4 +105,4 @@ LIBC_INLINE ErrorOr<size_t> vfprintf_internal(::FILE *__restrict stream,
} // namespace printf_core
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_VFPRINTF_INTERNAL_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_VFPRINTF_INTERNAL_H
diff --git a/libc/src/stdio/printf_core/write_int_converter.h b/libc/src/__support/printf_core/write_int_converter.h
similarity index 88%
rename from libc/src/stdio/printf_core/write_int_converter.h
rename to libc/src/__support/printf_core/write_int_converter.h
index 2844a56dc9922..0d6c79015164d 100644
--- a/libc/src/stdio/printf_core/write_int_converter.h
+++ b/libc/src/__support/printf_core/write_int_converter.h
@@ -6,12 +6,12 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_WRITE_INT_CONVERTER_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_WRITE_INT_CONVERTER_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_WRITE_INT_CONVERTER_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_WRITE_INT_CONVERTER_H
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/writer.h"
#include <inttypes.h>
#include <stddef.h>
@@ -75,4 +75,4 @@ LIBC_INLINE int convert_write_int(Writer<write_mode> *writer,
} // namespace printf_core
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_WRITE_INT_CONVERTER_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_WRITE_INT_CONVERTER_H
diff --git a/libc/src/stdio/printf_core/write_modes.def b/libc/src/__support/printf_core/write_modes.def
similarity index 100%
rename from libc/src/stdio/printf_core/write_modes.def
rename to libc/src/__support/printf_core/write_modes.def
diff --git a/libc/src/stdio/printf_core/writer.h b/libc/src/__support/printf_core/writer.h
similarity index 97%
rename from libc/src/stdio/printf_core/writer.h
rename to libc/src/__support/printf_core/writer.h
index b82792e4d5e02..e7d3fe530d7b0 100644
--- a/libc/src/stdio/printf_core/writer.h
+++ b/libc/src/__support/printf_core/writer.h
@@ -6,13 +6,13 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_WRITER_H
-#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_WRITER_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_WRITER_H
+#define LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_WRITER_H
#include "src/__support/CPP/string_view.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/optimization.h"
-#include "src/stdio/printf_core/core_structs.h"
+#include "src/__support/printf_core/core_structs.h"
#include "src/string/memory_utils/inline_memcpy.h"
#include "src/string/memory_utils/inline_memset.h"
@@ -23,7 +23,7 @@ namespace printf_core {
#define HANDLE_WRITE_MODE(MODE) MODE,
enum class WriteMode {
-#include "src/stdio/printf_core/write_modes.def"
+#include "src/__support/printf_core/write_modes.def"
};
#undef HANDLE_WRITE_MODE
@@ -254,4 +254,4 @@ Writer(WriteBuffer<WriteMode::FLUSH_TO_STREAM>)
} // namespace printf_core
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STDIO_PRINTF_CORE_WRITER_H
+#endif // LLVM_LIBC_SRC___SUPPORT_PRINTF_CORE_WRITER_H
diff --git a/libc/src/stdio/CMakeLists.txt b/libc/src/stdio/CMakeLists.txt
index feee8d60d1c60..0e3fe55462e03 100644
--- a/libc/src/stdio/CMakeLists.txt
+++ b/libc/src/stdio/CMakeLists.txt
@@ -129,10 +129,10 @@ add_entrypoint_object(
HDRS
sprintf.h
DEPENDS
- libc.src.stdio.printf_core.printf_main
- libc.src.stdio.printf_core.writer
- libc.src.stdio.printf_core.core_structs
- libc.src.stdio.printf_core.error_mapper
+ libc.src.__support.printf_core.printf_main
+ libc.src.__support.printf_core.writer
+ libc.src.__support.printf_core.core_structs
+ libc.src.__support.printf_core.error_mapper
libc.src.__support.libc_errno
libc.src.__support.CPP.limits
)
@@ -148,10 +148,10 @@ add_entrypoint_object(
HDRS
snprintf.h
DEPENDS
- libc.src.stdio.printf_core.printf_main
- libc.src.stdio.printf_core.writer
- libc.src.stdio.printf_core.core_structs
- libc.src.stdio.printf_core.error_mapper
+ libc.src.__support.printf_core.printf_main
+ libc.src.__support.printf_core.writer
+ libc.src.__support.printf_core.core_structs
+ libc.src.__support.printf_core.error_mapper
libc.src.__support.libc_errno
libc.src.__support.CPP.limits
)
@@ -167,9 +167,9 @@ add_entrypoint_object(
HDRS
asprintf.h
DEPENDS
- libc.src.stdio.printf_core.vasprintf_internal
- libc.src.stdio.printf_core.core_structs
- libc.src.stdio.printf_core.error_mapper
+ libc.src.__support.printf_core.vasprintf_internal
+ libc.src.__support.printf_core.core_structs
+ libc.src.__support.printf_core.error_mapper
libc.src.__support.libc_errno
libc.src.__support.CPP.limits
)
@@ -186,10 +186,10 @@ add_entrypoint_object(
HDRS
vsprintf.h
DEPENDS
- libc.src.stdio.printf_core.printf_main
- libc.src.stdio.printf_core.writer
- libc.src.stdio.printf_core.core_structs
- libc.src.stdio.printf_core.error_mapper
+ libc.src.__support.printf_core.printf_main
+ libc.src.__support.printf_core.writer
+ libc.src.__support.printf_core.core_structs
+ libc.src.__support.printf_core.error_mapper
libc.src.__support.libc_errno
libc.src.__support.CPP.limits
)
@@ -206,10 +206,10 @@ add_entrypoint_object(
HDRS
vsnprintf.h
DEPENDS
- libc.src.stdio.printf_core.printf_main
- libc.src.stdio.printf_core.writer
- libc.src.stdio.printf_core.core_structs
- libc.src.stdio.printf_core.error_mapper
+ libc.src.__support.printf_core.printf_main
+ libc.src.__support.printf_core.writer
+ libc.src.__support.printf_core.core_structs
+ libc.src.__support.printf_core.error_mapper
libc.src.__support.libc_errno
libc.src.__support.CPP.limits
)
@@ -226,14 +226,13 @@ add_entrypoint_object(
HDRS
vasprintf.h
DEPENDS
- libc.src.stdio.printf_core.vasprintf_internal
- libc.src.stdio.printf_core.core_structs
- libc.src.stdio.printf_core.error_mapper
+ libc.src.__support.printf_core.vasprintf_internal
+ libc.src.__support.printf_core.core_structs
+ libc.src.__support.printf_core.error_mapper
libc.src.__support.libc_errno
libc.src.__support.CPP.limits
)
-add_subdirectory(printf_core)
add_subdirectory(scanf_core)
add_entrypoint_object(
diff --git a/libc/src/stdio/asprintf.cpp b/libc/src/stdio/asprintf.cpp
index f80d2a5eb759d..433e300056203 100644
--- a/libc/src/stdio/asprintf.cpp
+++ b/libc/src/stdio/asprintf.cpp
@@ -11,9 +11,9 @@
#include "src/__support/arg_list.h"
#include "src/__support/libc_errno.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
-#include "src/stdio/printf_core/vasprintf_internal.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
+#include "src/__support/printf_core/vasprintf_internal.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/stdio/asprintf_modular.cpp b/libc/src/stdio/asprintf_modular.cpp
index 74b62cc0c2501..c832eec29e56d 100644
--- a/libc/src/stdio/asprintf_modular.cpp
+++ b/libc/src/stdio/asprintf_modular.cpp
@@ -11,9 +11,9 @@
#include "src/__support/libc_errno.h"
#include "src/__support/macros/config.h"
#include "src/stdio/asprintf.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
-#include "src/stdio/printf_core/vasprintf_internal.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
+#include "src/__support/printf_core/vasprintf_internal.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/stdio/baremetal/CMakeLists.txt b/libc/src/stdio/baremetal/CMakeLists.txt
index 526400380941c..d26cdbb0f9d51 100644
--- a/libc/src/stdio/baremetal/CMakeLists.txt
+++ b/libc/src/stdio/baremetal/CMakeLists.txt
@@ -22,10 +22,10 @@ add_header_library(
libc.src.__support.CPP.string_view
libc.src.__support.libc_errno
libc.src.__support.OSUtil.osutil
- libc.src.stdio.printf_core.printf_main
- libc.src.stdio.printf_core.writer
- libc.src.stdio.printf_core.error_mapper
- libc.src.stdio.printf_core.core_structs
+ libc.src.__support.printf_core.printf_main
+ libc.src.__support.printf_core.writer
+ libc.src.__support.printf_core.error_mapper
+ libc.src.__support.printf_core.core_structs
)
add_header_library(
diff --git a/libc/src/stdio/baremetal/vfprintf_internal.h b/libc/src/stdio/baremetal/vfprintf_internal.h
index c4cd8b8ad8a83..c86c40a7cca0c 100644
--- a/libc/src/stdio/baremetal/vfprintf_internal.h
+++ b/libc/src/stdio/baremetal/vfprintf_internal.h
@@ -17,10 +17,10 @@
#include "src/__support/common.h"
#include "src/__support/libc_errno.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
-#include "src/stdio/printf_core/printf_main.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
+#include "src/__support/printf_core/printf_main.h"
+#include "src/__support/printf_core/writer.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/stdio/generic/CMakeLists.txt b/libc/src/stdio/generic/CMakeLists.txt
index a9c5ae698c3bb..6b3b611ad731f 100644
--- a/libc/src/stdio/generic/CMakeLists.txt
+++ b/libc/src/stdio/generic/CMakeLists.txt
@@ -412,9 +412,9 @@ list(APPEND fprintf_deps
libc.src.__support.arg_list
libc.src.__support.CPP.limits
libc.src.__support.libc_errno
- libc.src.stdio.printf_core.vfprintf_internal
- libc.src.stdio.printf_core.core_structs
- libc.src.stdio.printf_core.error_mapper
+ libc.src.__support.printf_core.vfprintf_internal
+ libc.src.__support.printf_core.core_structs
+ libc.src.__support.printf_core.error_mapper
)
if(LLVM_LIBC_FULL_BUILD)
diff --git a/libc/src/stdio/generic/fprintf.cpp b/libc/src/stdio/generic/fprintf.cpp
index b2033901557a0..11eeeb7dd4ade 100644
--- a/libc/src/stdio/generic/fprintf.cpp
+++ b/libc/src/stdio/generic/fprintf.cpp
@@ -12,9 +12,9 @@
#include "src/__support/File/file.h"
#include "src/__support/arg_list.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
-#include "src/stdio/printf_core/vfprintf_internal.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
+#include "src/__support/printf_core/vfprintf_internal.h"
#include "hdr/types/FILE.h"
#include <stdarg.h>
diff --git a/libc/src/stdio/generic/printf.cpp b/libc/src/stdio/generic/printf.cpp
index d02007dbd1471..5cb8820f8c84c 100644
--- a/libc/src/stdio/generic/printf.cpp
+++ b/libc/src/stdio/generic/printf.cpp
@@ -12,9 +12,9 @@
#include "src/__support/File/file.h"
#include "src/__support/arg_list.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
-#include "src/stdio/printf_core/vfprintf_internal.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
+#include "src/__support/printf_core/vfprintf_internal.h"
#include "src/stdio/stdout.h"
#include "hdr/types/FILE.h"
diff --git a/libc/src/stdio/generic/vfprintf.cpp b/libc/src/stdio/generic/vfprintf.cpp
index a26f082ed9347..fe70296a4b3af 100644
--- a/libc/src/stdio/generic/vfprintf.cpp
+++ b/libc/src/stdio/generic/vfprintf.cpp
@@ -12,9 +12,9 @@
#include "src/__support/File/file.h"
#include "src/__support/arg_list.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
-#include "src/stdio/printf_core/vfprintf_internal.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
+#include "src/__support/printf_core/vfprintf_internal.h"
#include "hdr/types/FILE.h"
#include <stdarg.h>
diff --git a/libc/src/stdio/generic/vprintf.cpp b/libc/src/stdio/generic/vprintf.cpp
index 2bd3b40a821ce..ee9e0d3059a22 100644
--- a/libc/src/stdio/generic/vprintf.cpp
+++ b/libc/src/stdio/generic/vprintf.cpp
@@ -12,9 +12,9 @@
#include "src/__support/File/file.h"
#include "src/__support/arg_list.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
-#include "src/stdio/printf_core/vfprintf_internal.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
+#include "src/__support/printf_core/vfprintf_internal.h"
#include "src/stdio/stdout.h"
#include "hdr/types/FILE.h"
diff --git a/libc/src/stdio/snprintf.cpp b/libc/src/stdio/snprintf.cpp
index d8fb1b1ad3577..ec1364ca6efc2 100644
--- a/libc/src/stdio/snprintf.cpp
+++ b/libc/src/stdio/snprintf.cpp
@@ -12,10 +12,10 @@
#include "src/__support/arg_list.h"
#include "src/__support/libc_errno.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
-#include "src/stdio/printf_core/printf_main.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
+#include "src/__support/printf_core/printf_main.h"
+#include "src/__support/printf_core/writer.h"
#include <stdarg.h>
#include <stddef.h>
diff --git a/libc/src/stdio/snprintf_modular.cpp b/libc/src/stdio/snprintf_modular.cpp
index 2e7683d56de75..86afdb9c5828e 100644
--- a/libc/src/stdio/snprintf_modular.cpp
+++ b/libc/src/stdio/snprintf_modular.cpp
@@ -12,10 +12,10 @@
#include "src/__support/arg_list.h"
#include "src/__support/libc_errno.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
-#include "src/stdio/printf_core/printf_main.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
+#include "src/__support/printf_core/printf_main.h"
+#include "src/__support/printf_core/writer.h"
#include <stdarg.h>
#include <stddef.h>
diff --git a/libc/src/stdio/sprintf.cpp b/libc/src/stdio/sprintf.cpp
index bbb3f64ea7b15..702ea5d43c69a 100644
--- a/libc/src/stdio/sprintf.cpp
+++ b/libc/src/stdio/sprintf.cpp
@@ -12,10 +12,10 @@
#include "src/__support/arg_list.h"
#include "src/__support/libc_errno.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
-#include "src/stdio/printf_core/printf_main.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
+#include "src/__support/printf_core/printf_main.h"
+#include "src/__support/printf_core/writer.h"
#include <stdarg.h>
diff --git a/libc/src/stdio/sprintf_modular.cpp b/libc/src/stdio/sprintf_modular.cpp
index cfed3fe4a4f4d..9003e2440d535 100644
--- a/libc/src/stdio/sprintf_modular.cpp
+++ b/libc/src/stdio/sprintf_modular.cpp
@@ -12,10 +12,10 @@
#include "src/__support/arg_list.h"
#include "src/__support/libc_errno.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
-#include "src/stdio/printf_core/printf_main.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
+#include "src/__support/printf_core/printf_main.h"
+#include "src/__support/printf_core/writer.h"
#include <stdarg.h>
diff --git a/libc/src/stdio/vasprintf.cpp b/libc/src/stdio/vasprintf.cpp
index 64d959c6edcae..444b5b1efffde 100644
--- a/libc/src/stdio/vasprintf.cpp
+++ b/libc/src/stdio/vasprintf.cpp
@@ -10,9 +10,9 @@
#include "src/__support/CPP/limits.h"
#include "src/__support/arg_list.h"
#include "src/__support/libc_errno.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
-#include "src/stdio/printf_core/vasprintf_internal.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
+#include "src/__support/printf_core/vasprintf_internal.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/stdio/vasprintf_modular.cpp b/libc/src/stdio/vasprintf_modular.cpp
index 98620bb8a440c..87dda8e82813f 100644
--- a/libc/src/stdio/vasprintf_modular.cpp
+++ b/libc/src/stdio/vasprintf_modular.cpp
@@ -9,9 +9,9 @@
#include "src/__support/CPP/limits.h"
#include "src/__support/arg_list.h"
#include "src/__support/libc_errno.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
-#include "src/stdio/printf_core/vasprintf_internal.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
+#include "src/__support/printf_core/vasprintf_internal.h"
#include "src/stdio/vasprintf.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/stdio/vsnprintf.cpp b/libc/src/stdio/vsnprintf.cpp
index bea980d6b20ec..b25daed931fce 100644
--- a/libc/src/stdio/vsnprintf.cpp
+++ b/libc/src/stdio/vsnprintf.cpp
@@ -12,10 +12,10 @@
#include "src/__support/arg_list.h"
#include "src/__support/libc_errno.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
-#include "src/stdio/printf_core/printf_main.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
+#include "src/__support/printf_core/printf_main.h"
+#include "src/__support/printf_core/writer.h"
#include <stdarg.h>
#include <stddef.h>
diff --git a/libc/src/stdio/vsnprintf_modular.cpp b/libc/src/stdio/vsnprintf_modular.cpp
index 7225311601281..96f020839c3cc 100644
--- a/libc/src/stdio/vsnprintf_modular.cpp
+++ b/libc/src/stdio/vsnprintf_modular.cpp
@@ -12,10 +12,10 @@
#include "src/__support/arg_list.h"
#include "src/__support/libc_errno.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
-#include "src/stdio/printf_core/printf_main.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
+#include "src/__support/printf_core/printf_main.h"
+#include "src/__support/printf_core/writer.h"
#include <stdarg.h>
#include <stddef.h>
diff --git a/libc/src/stdio/vsprintf.cpp b/libc/src/stdio/vsprintf.cpp
index 3dae05fbbaadd..f1af2f6143ad2 100644
--- a/libc/src/stdio/vsprintf.cpp
+++ b/libc/src/stdio/vsprintf.cpp
@@ -12,10 +12,10 @@
#include "src/__support/arg_list.h"
#include "src/__support/libc_errno.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
-#include "src/stdio/printf_core/printf_main.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
+#include "src/__support/printf_core/printf_main.h"
+#include "src/__support/printf_core/writer.h"
#include <stdarg.h>
diff --git a/libc/src/stdio/vsprintf_modular.cpp b/libc/src/stdio/vsprintf_modular.cpp
index 844d1e3cdd550..34deab1bfe412 100644
--- a/libc/src/stdio/vsprintf_modular.cpp
+++ b/libc/src/stdio/vsprintf_modular.cpp
@@ -12,10 +12,10 @@
#include "src/__support/arg_list.h"
#include "src/__support/libc_errno.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
-#include "src/stdio/printf_core/printf_main.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
+#include "src/__support/printf_core/printf_main.h"
+#include "src/__support/printf_core/writer.h"
#include <stdarg.h>
diff --git a/libc/src/stdlib/CMakeLists.txt b/libc/src/stdlib/CMakeLists.txt
index 8758694d1b272..7fd15108b8e07 100644
--- a/libc/src/stdlib/CMakeLists.txt
+++ b/libc/src/stdlib/CMakeLists.txt
@@ -116,7 +116,7 @@ add_entrypoint_object(
DEPENDS
.str_from_util
libc.src.__support.CPP.limits
- libc.src.stdio.printf_core.error_mapper
+ libc.src.__support.printf_core.error_mapper
)
add_entrypoint_object(
@@ -128,7 +128,7 @@ add_entrypoint_object(
DEPENDS
.str_from_util
libc.src.__support.CPP.limits
- libc.src.stdio.printf_core.error_mapper
+ libc.src.__support.printf_core.error_mapper
)
add_entrypoint_object(
@@ -140,7 +140,7 @@ add_entrypoint_object(
DEPENDS
.str_from_util
libc.src.__support.CPP.limits
- libc.src.stdio.printf_core.error_mapper
+ libc.src.__support.printf_core.error_mapper
)
add_header_library(
@@ -148,9 +148,9 @@ add_header_library(
HDRS
str_from_util.h
DEPENDS
- libc.src.stdio.printf_core.converter
- libc.src.stdio.printf_core.core_structs
- libc.src.stdio.printf_core.writer
+ libc.src.__support.printf_core.converter
+ libc.src.__support.printf_core.core_structs
+ libc.src.__support.printf_core.writer
libc.src.__support.str_to_integer
libc.src.__support.CPP.type_traits
)
diff --git a/libc/src/stdlib/str_from_util.h b/libc/src/stdlib/str_from_util.h
index 61e6ba24b3817..9abdf14983a5e 100644
--- a/libc/src/stdlib/str_from_util.h
+++ b/libc/src/stdlib/str_from_util.h
@@ -20,9 +20,9 @@
#include "src/__support/CPP/type_traits.h"
#include "src/__support/macros/config.h"
#include "src/__support/str_to_integer.h"
-#include "src/stdio/printf_core/converter_atlas.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/converter_atlas.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/writer.h"
#include <stddef.h>
diff --git a/libc/src/stdlib/strfromd.cpp b/libc/src/stdlib/strfromd.cpp
index 5409a57c722d4..dbf46b7c0534b 100644
--- a/libc/src/stdlib/strfromd.cpp
+++ b/libc/src/stdlib/strfromd.cpp
@@ -9,8 +9,8 @@
#include "src/stdlib/strfromd.h"
#include "src/__support/CPP/limits.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
#include "src/stdlib/str_from_util.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/stdlib/strfromf.cpp b/libc/src/stdlib/strfromf.cpp
index e68e50210dd4d..d1ea47d55a250 100644
--- a/libc/src/stdlib/strfromf.cpp
+++ b/libc/src/stdlib/strfromf.cpp
@@ -9,8 +9,8 @@
#include "src/stdlib/strfromf.h"
#include "src/__support/CPP/limits.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
#include "src/stdlib/str_from_util.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/stdlib/strfroml.cpp b/libc/src/stdlib/strfroml.cpp
index 8dbd8d7fc4f2e..c23c12fc91c27 100644
--- a/libc/src/stdlib/strfroml.cpp
+++ b/libc/src/stdlib/strfroml.cpp
@@ -9,8 +9,8 @@
#include "src/stdlib/strfroml.h"
#include "src/__support/CPP/limits.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/error_mapper.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/error_mapper.h"
#include "src/stdlib/str_from_util.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/time/CMakeLists.txt b/libc/src/time/CMakeLists.txt
index f42b9b3723ca0..00a5ab15cecd7 100644
--- a/libc/src/time/CMakeLists.txt
+++ b/libc/src/time/CMakeLists.txt
@@ -189,9 +189,9 @@ add_entrypoint_object(
DEPENDS
libc.hdr.types.size_t
libc.hdr.types.struct_tm
- libc.src.stdio.printf_core.writer
libc.src.time.strftime_core.strftime_main
libc.src.__support.macros.null_check
+ libc.src.__support.printf_core.writer
)
add_entrypoint_object(
@@ -204,9 +204,9 @@ add_entrypoint_object(
libc.hdr.types.locale_t
libc.hdr.types.size_t
libc.hdr.types.struct_tm
- libc.src.stdio.printf_core.writer
libc.src.time.strftime_core.strftime_main
libc.src.__support.macros.null_check
+ libc.src.__support.printf_core.writer
)
add_entrypoint_object(
diff --git a/libc/src/time/strftime.cpp b/libc/src/time/strftime.cpp
index 71e1e99080e56..5522a2c1d2e4b 100644
--- a/libc/src/time/strftime.cpp
+++ b/libc/src/time/strftime.cpp
@@ -12,7 +12,7 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/null_check.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/writer.h"
#include "src/time/strftime_core/strftime_main.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/time/strftime_core/CMakeLists.txt b/libc/src/time/strftime_core/CMakeLists.txt
index 31eb41aa1647f..6996638128da5 100644
--- a/libc/src/time/strftime_core/CMakeLists.txt
+++ b/libc/src/time/strftime_core/CMakeLists.txt
@@ -30,7 +30,7 @@ add_header_library(
.core_structs
libc.src.time.time_utils
libc.src.time.time_constants
- libc.src.stdio.printf_core.writer
+ libc.src.__support.printf_core.writer
libc.src.__support.CPP.string_view
libc.src.__support.integer_to_string
libc.src.__support.error_or
@@ -45,6 +45,6 @@ add_header_library(
.parser
.converter
libc.src.__support.error_or
- libc.src.stdio.printf_core.writer
+ libc.src.__support.printf_core.writer
libc.hdr.types.struct_tm
)
diff --git a/libc/src/time/strftime_core/composite_converter.h b/libc/src/time/strftime_core/composite_converter.h
index 9d343f3aef611..ec279615806e9 100644
--- a/libc/src/time/strftime_core/composite_converter.h
+++ b/libc/src/time/strftime_core/composite_converter.h
@@ -12,7 +12,7 @@
#include "hdr/types/struct_tm.h"
#include "src/__support/CPP/string_view.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/writer.h"
#include "src/time/strftime_core/core_structs.h"
#include "src/time/strftime_core/num_converter.h"
#include "src/time/strftime_core/str_converter.h"
diff --git a/libc/src/time/strftime_core/converter.h b/libc/src/time/strftime_core/converter.h
index 94e4366b4cb23..b6203ae8b72d0 100644
--- a/libc/src/time/strftime_core/converter.h
+++ b/libc/src/time/strftime_core/converter.h
@@ -16,7 +16,7 @@
#include "hdr/types/struct_tm.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/writer.h"
#include "src/time/strftime_core/composite_converter.h"
#include "src/time/strftime_core/core_structs.h"
#include "src/time/strftime_core/num_converter.h"
diff --git a/libc/src/time/strftime_core/num_converter.h b/libc/src/time/strftime_core/num_converter.h
index c44e2058b6653..6bcc166fecf93 100644
--- a/libc/src/time/strftime_core/num_converter.h
+++ b/libc/src/time/strftime_core/num_converter.h
@@ -14,7 +14,7 @@
#include "src/__support/error_or.h"
#include "src/__support/integer_to_string.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/writer.h"
#include "src/time/strftime_core/core_structs.h"
#include "src/time/time_constants.h"
#include "src/time/time_utils.h"
diff --git a/libc/src/time/strftime_core/str_converter.h b/libc/src/time/strftime_core/str_converter.h
index 3273dcf9a6b86..4a636679c4a18 100644
--- a/libc/src/time/strftime_core/str_converter.h
+++ b/libc/src/time/strftime_core/str_converter.h
@@ -17,7 +17,7 @@
#include "hdr/types/struct_tm.h"
#include "src/__support/CPP/string_view.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/writer.h"
#include "src/time/strftime_core/core_structs.h"
#include "src/time/time_constants.h"
#include "src/time/time_utils.h"
diff --git a/libc/src/time/strftime_core/strftime_main.h b/libc/src/time/strftime_core/strftime_main.h
index 855a44107914c..4f958fb5bb294 100644
--- a/libc/src/time/strftime_core/strftime_main.h
+++ b/libc/src/time/strftime_core/strftime_main.h
@@ -12,7 +12,7 @@
#include "hdr/types/struct_tm.h"
#include "src/__support/error_or.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/writer.h"
#include "src/time/strftime_core/converter.h"
#include "src/time/strftime_core/core_structs.h"
#include "src/time/strftime_core/parser.h"
diff --git a/libc/src/time/strftime_l.cpp b/libc/src/time/strftime_l.cpp
index 8a8950fee91cc..faf3883c476b2 100644
--- a/libc/src/time/strftime_l.cpp
+++ b/libc/src/time/strftime_l.cpp
@@ -13,7 +13,7 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/null_check.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/writer.h"
#include "src/time/strftime_core/strftime_main.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/test/UnitTest/CMakeLists.txt b/libc/test/UnitTest/CMakeLists.txt
index 02489107efc06..78fb84b4f701a 100644
--- a/libc/test/UnitTest/CMakeLists.txt
+++ b/libc/test/UnitTest/CMakeLists.txt
@@ -183,8 +183,8 @@ add_unittest_framework_library(
LibcTest
libc.hdr.stdint_proxy
libc.src.__support.FPUtil.fp_bits
- libc.src.stdio.printf_core.core_structs
- libc.src.stdio.printf_core.printf_config
+ libc.src.__support.printf_core.core_structs
+ libc.src.__support.printf_core.printf_config
libc.test.UnitTest.string_utils
)
diff --git a/libc/test/UnitTest/PrintfMatcher.cpp b/libc/test/UnitTest/PrintfMatcher.cpp
index 886737f0dcb06..4fa8864b8744a 100644
--- a/libc/test/UnitTest/PrintfMatcher.cpp
+++ b/libc/test/UnitTest/PrintfMatcher.cpp
@@ -11,8 +11,8 @@
#include "hdr/stdint_proxy.h"
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/printf_config.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/printf_config.h"
#include "test/UnitTest/StringUtils.h"
#include "test/UnitTest/Test.h"
diff --git a/libc/test/UnitTest/PrintfMatcher.h b/libc/test/UnitTest/PrintfMatcher.h
index 4f79832ab59fa..bb38aa43c36bd 100644
--- a/libc/test/UnitTest/PrintfMatcher.h
+++ b/libc/test/UnitTest/PrintfMatcher.h
@@ -10,7 +10,7 @@
#define LLVM_LIBC_UTILS_UNITTEST_PRINTF_MATCHER_H
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/core_structs.h"
+#include "src/__support/printf_core/core_structs.h"
#include "test/UnitTest/Test.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/test/shared/CMakeLists.txt b/libc/test/shared/CMakeLists.txt
index 0489bd2efaf79..fe80d3d15ae01 100644
--- a/libc/test/shared/CMakeLists.txt
+++ b/libc/test/shared/CMakeLists.txt
@@ -861,9 +861,9 @@ add_libc_test(
SRCS
shared_rpc_test.cpp
DEPENDS
- libc.src.stdio.printf_core.converter
- libc.src.stdio.printf_core.parser
- libc.src.stdio.printf_core.writer
+ libc.src.__support.printf_core.converter
+ libc.src.__support.printf_core.parser
+ libc.src.__support.printf_core.writer
libc.src.__support.arg_list
)
endif()
diff --git a/libc/test/src/__support/CMakeLists.txt b/libc/test/src/__support/CMakeLists.txt
index 8233529266326..4e6784691d5e5 100644
--- a/libc/test/src/__support/CMakeLists.txt
+++ b/libc/test/src/__support/CMakeLists.txt
@@ -305,6 +305,7 @@ add_libc_test(
add_subdirectory(CPP)
add_subdirectory(File)
+add_subdirectory(printf_core)
add_subdirectory(RPC)
add_subdirectory(OSUtil)
add_subdirectory(FPUtil)
diff --git a/libc/test/src/stdio/printf_core/CMakeLists.txt b/libc/test/src/__support/printf_core/CMakeLists.txt
similarity index 56%
rename from libc/test/src/stdio/printf_core/CMakeLists.txt
rename to libc/test/src/__support/printf_core/CMakeLists.txt
index ff7ebbc4f5fd0..b4db465666363 100644
--- a/libc/test/src/stdio/printf_core/CMakeLists.txt
+++ b/libc/test/src/__support/printf_core/CMakeLists.txt
@@ -1,14 +1,14 @@
add_libc_unittest(
parser_test
SUITE
- libc_stdio_unittests
+ libc-support-tests
SRCS
parser_test.cpp
LINK_LIBRARIES
LibcPrintfHelpers
DEPENDS
- libc.src.stdio.printf_core.parser
- libc.src.stdio.printf_core.core_structs
+ libc.src.__support.printf_core.parser
+ libc.src.__support.printf_core.core_structs
libc.src.__support.CPP.string_view
libc.src.__support.arg_list
)
@@ -16,11 +16,11 @@ add_libc_unittest(
add_libc_unittest(
writer_test
SUITE
- libc_stdio_unittests
+ libc-support-tests
SRCS
writer_test.cpp
DEPENDS
- libc.src.stdio.printf_core.writer
+ libc.src.__support.printf_core.writer
libc.src.string.memory_utils.inline_memcpy
libc.src.__support.CPP.string_view
)
@@ -28,11 +28,11 @@ add_libc_unittest(
add_libc_unittest(
converter_test
SUITE
- libc_stdio_unittests
+ libc-support-tests
SRCS
converter_test.cpp
DEPENDS
- libc.src.stdio.printf_core.converter
- libc.src.stdio.printf_core.writer
- libc.src.stdio.printf_core.core_structs
+ libc.src.__support.printf_core.converter
+ libc.src.__support.printf_core.writer
+ libc.src.__support.printf_core.core_structs
)
diff --git a/libc/test/src/stdio/printf_core/converter_test.cpp b/libc/test/src/__support/printf_core/converter_test.cpp
similarity index 98%
rename from libc/test/src/stdio/printf_core/converter_test.cpp
rename to libc/test/src/__support/printf_core/converter_test.cpp
index 68e2fdac89d47..36037ab2ed4b0 100644
--- a/libc/test/src/stdio/printf_core/converter_test.cpp
+++ b/libc/test/src/__support/printf_core/converter_test.cpp
@@ -6,9 +6,9 @@
//
//===----------------------------------------------------------------------===//
-#include "src/stdio/printf_core/converter.h"
-#include "src/stdio/printf_core/core_structs.h"
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/converter.h"
+#include "src/__support/printf_core/core_structs.h"
+#include "src/__support/printf_core/writer.h"
#include "test/UnitTest/Test.h"
diff --git a/libc/test/src/stdio/printf_core/parser_test.cpp b/libc/test/src/__support/printf_core/parser_test.cpp
similarity index 99%
rename from libc/test/src/stdio/printf_core/parser_test.cpp
rename to libc/test/src/__support/printf_core/parser_test.cpp
index a73e3af990dd3..591bf2de87125 100644
--- a/libc/test/src/stdio/printf_core/parser_test.cpp
+++ b/libc/test/src/__support/printf_core/parser_test.cpp
@@ -9,7 +9,7 @@
#include "src/__support/CPP/bit.h"
#include "src/__support/CPP/string_view.h"
#include "src/__support/arg_list.h"
-#include "src/stdio/printf_core/parser.h"
+#include "src/__support/printf_core/parser.h"
#include <stdarg.h>
diff --git a/libc/test/src/stdio/printf_core/writer_test.cpp b/libc/test/src/__support/printf_core/writer_test.cpp
similarity index 99%
rename from libc/test/src/stdio/printf_core/writer_test.cpp
rename to libc/test/src/__support/printf_core/writer_test.cpp
index e0128505b2766..b1873d729bb3f 100644
--- a/libc/test/src/stdio/printf_core/writer_test.cpp
+++ b/libc/test/src/__support/printf_core/writer_test.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "src/stdio/printf_core/writer.h"
+#include "src/__support/printf_core/writer.h"
#include "src/__support/CPP/string_view.h"
#include "src/string/memory_utils/inline_memcpy.h"
diff --git a/libc/test/src/stdio/CMakeLists.txt b/libc/test/src/stdio/CMakeLists.txt
index 5f586238dc1e9..9bda326a0624c 100644
--- a/libc/test/src/stdio/CMakeLists.txt
+++ b/libc/test/src/stdio/CMakeLists.txt
@@ -173,9 +173,9 @@ add_fp_unittest(
SRCS
sprintf_test.cpp
DEPENDS
- libc.src.stdio.printf_core.printf_config
libc.src.stdio.sprintf
libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.printf_core.printf_config
libc.include.inttypes
${wchar_deps}
COMPILE_OPTIONS
@@ -607,6 +607,5 @@ if(LIBC_TARGET_OS_IS_GPU)
return()
endif()
-add_subdirectory(printf_core)
add_subdirectory(scanf_core)
add_subdirectory(testdata)
diff --git a/libc/test/src/stdio/sprintf_test.cpp b/libc/test/src/stdio/sprintf_test.cpp
index 3c0e9c74d0c06..a366920339110 100644
--- a/libc/test/src/stdio/sprintf_test.cpp
+++ b/libc/test/src/stdio/sprintf_test.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "src/__support/macros/config.h"
-#include "src/stdio/printf_core/printf_config.h"
+#include "src/__support/printf_core/printf_config.h"
#include "src/stdio/sprintf.h"
#ifndef LIBC_COPT_PRINTF_DISABLE_WIDE
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index 3765b06a9211d..e3d2a022fba55 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -1982,6 +1982,180 @@ libc_support_library(
],
)
+libc_support_library(
+ name = "__support_printf_core_printf_config",
+ hdrs = ["src/__support/printf_core/printf_config.h"],
+ deps = [
+ ],
+)
+
+libc_support_library(
+ name = "__support_printf_core_printf_core_structs",
+ hdrs = ["src/__support/printf_core/core_structs.h"],
+ deps = [
+ ":__support_cpp_string_view",
+ ":__support_cpp_type_traits",
+ ":__support_fputil_fp_bits",
+ ":__support_macros_config",
+ ":__support_printf_core_printf_config",
+ ],
+)
+
+libc_support_library(
+ name = "__support_printf_core_printf_parser",
+ hdrs = ["src/__support/printf_core/parser.h"],
+ deps = [
+ ":__support_arg_list",
+ ":__support_common",
+ ":__support_cpp_algorithm",
+ ":__support_cpp_bit",
+ ":__support_cpp_limits",
+ ":__support_cpp_optional",
+ ":__support_cpp_string_view",
+ ":__support_cpp_type_traits",
+ ":__support_ctype_utils",
+ ":__support_fixed_point",
+ ":__support_fputil_fp_bits",
+ ":__support_libc_errno",
+ ":__support_macros_config",
+ ":__support_macros_properties_types",
+ ":__support_printf_core_printf_config",
+ ":__support_printf_core_printf_core_structs",
+ ":__support_str_to_integer",
+ ":errno",
+ ":llvm_libc_macros_stdfix_macros",
+ ":types_wint_t",
+ ],
+)
+
+libc_support_library(
+ name = "__support_printf_core_printf_writer",
+ hdrs = ["src/__support/printf_core/writer.h"],
+ textual_hdrs = ["src/__support/printf_core/write_modes.def"],
+ deps = [
+ ":__support_cpp_string_view",
+ ":__support_macros_config",
+ ":__support_macros_optimization",
+ ":__support_printf_core_printf_core_structs",
+ ":string_memory_utils",
+ ],
+)
+
+libc_support_library(
+ name = "__support_printf_core_printf_converter",
+ hdrs = [
+ "src/__support/printf_core/char_converter.h",
+ "src/__support/printf_core/converter.h",
+ "src/__support/printf_core/converter_atlas.h",
+ "src/__support/printf_core/converter_utils.h",
+ "src/__support/printf_core/float_dec_converter.h",
+ "src/__support/printf_core/float_hex_converter.h",
+ "src/__support/printf_core/float_inf_nan_converter.h",
+ "src/__support/printf_core/int_converter.h",
+ "src/__support/printf_core/ptr_converter.h",
+ "src/__support/printf_core/strerror_converter.h",
+ "src/__support/printf_core/string_converter.h",
+ "src/__support/printf_core/write_int_converter.h",
+ ],
+ deps = [
+ ":__support_big_int",
+ ":__support_common",
+ ":__support_cpp_limits",
+ ":__support_cpp_span",
+ ":__support_cpp_string_view",
+ ":__support_ctype_utils",
+ ":__support_float_to_string",
+ ":__support_fputil_fenv_impl",
+ ":__support_fputil_fp_bits",
+ ":__support_fputil_rounding_mode",
+ ":__support_integer_to_string",
+ ":__support_libc_assert",
+ ":__support_macros_config",
+ ":__support_printf_core_printf_config",
+ ":__support_printf_core_printf_core_structs",
+ ":__support_printf_core_printf_writer",
+ ":__support_stringutil",
+ ":__support_uint128",
+ ":__support_wchar_mbstate",
+ ":__support_wchar_string_converter",
+ ":__support_wchar_wcrtomb",
+ ":hdr_limits_macros",
+ ":hdr_wchar_macros",
+ ":string_utils",
+ ":types_char32_t",
+ ":types_char8_t",
+ ":types_wchar_t",
+ ":types_wint_t",
+ ],
+)
+
+libc_support_library(
+ name = "__support_printf_core_printf_error_mapper",
+ hdrs = [
+ "src/__support/printf_core/error_mapper.h",
+ ] + select({
+ "@platforms//os:linux": [
+ "src/__support/printf_core/linux/error_mapper.h",
+ ],
+ "//conditions:default": ["src/__support/printf_core/generic/error_mapper.h"],
+ }),
+ deps = [
+ ":__support_cpp_type_traits",
+ ":__support_error_or",
+ ":__support_macros_properties_architectures",
+ ":__support_printf_core_printf_core_structs",
+ ":hdr_errno_macros",
+ ],
+)
+
+libc_support_library(
+ name = "__support_printf_core_printf_main",
+ hdrs = ["src/__support/printf_core/printf_main.h"],
+ deps = [
+ ":__support_arg_list",
+ ":__support_error_or",
+ ":__support_macros_config",
+ ":__support_printf_core_printf_converter",
+ ":__support_printf_core_printf_core_structs",
+ ":__support_printf_core_printf_error_mapper",
+ ":__support_printf_core_printf_parser",
+ ":__support_printf_core_printf_writer",
+ ],
+)
+
+libc_support_library(
+ name = "__support_printf_core_vfprintf_internal",
+ hdrs = ["src/__support/printf_core/vfprintf_internal.h"],
+ deps = [
+ ":__support_arg_list",
+ ":__support_error_or",
+ ":__support_file_file",
+ ":__support_macros_attributes",
+ ":__support_macros_config",
+ ":__support_printf_core_printf_core_structs",
+ ":__support_printf_core_printf_main",
+ ":__support_printf_core_printf_writer",
+ ":types_FILE",
+ ],
+)
+
+libc_support_library(
+ name = "__support_printf_core_vasprintf_internal",
+ hdrs = ["src/__support/printf_core/vasprintf_internal.h"],
+ deps = [
+ ":__support_arg_list",
+ ":__support_error_or",
+ ":__support_macros_attributes",
+ ":__support_printf_core_printf_core_structs",
+ ":__support_printf_core_printf_main",
+ ":__support_printf_core_printf_writer",
+ ":func_free",
+ ":func_malloc",
+ ":func_realloc",
+ ":types_FILE",
+ ],
+)
+
libc_support_library(
name = "__support_math_extras",
hdrs = ["src/__support/math_extras.h"],
@@ -13515,10 +13689,10 @@ libc_support_library(
":__support_common",
":__support_cpp_type_traits",
":__support_macros_config",
+ ":__support_printf_core_printf_converter",
+ ":__support_printf_core_printf_core_structs",
+ ":__support_printf_core_printf_writer",
":__support_str_to_integer",
- ":printf_converter",
- ":printf_core_structs",
- ":printf_writer",
],
)
@@ -13530,8 +13704,8 @@ libc_function(
":__support_common",
":__support_cpp_limits",
":__support_macros_config",
- ":printf_core_structs",
- ":printf_error_mapper",
+ ":__support_printf_core_printf_core_structs",
+ ":__support_printf_core_printf_error_mapper",
":str_from_util",
],
)
@@ -13544,8 +13718,8 @@ libc_function(
":__support_common",
":__support_cpp_limits",
":__support_macros_config",
- ":printf_core_structs",
- ":printf_error_mapper",
+ ":__support_printf_core_printf_core_structs",
+ ":__support_printf_core_printf_error_mapper",
":str_from_util",
],
)
@@ -13558,8 +13732,8 @@ libc_function(
":__support_common",
":__support_cpp_limits",
":__support_macros_config",
- ":printf_core_structs",
- ":printf_error_mapper",
+ ":__support_printf_core_printf_core_structs",
+ ":__support_printf_core_printf_error_mapper",
":str_from_util",
],
)
@@ -14904,180 +15078,6 @@ libc_support_library(
],
)
-libc_support_library(
- name = "printf_config",
- hdrs = ["src/stdio/printf_core/printf_config.h"],
- deps = [
- ],
-)
-
-libc_support_library(
- name = "printf_core_structs",
- hdrs = ["src/stdio/printf_core/core_structs.h"],
- deps = [
- ":__support_cpp_string_view",
- ":__support_cpp_type_traits",
- ":__support_fputil_fp_bits",
- ":__support_macros_config",
- ":printf_config",
- ],
-)
-
-libc_support_library(
- name = "printf_parser",
- hdrs = ["src/stdio/printf_core/parser.h"],
- deps = [
- ":__support_arg_list",
- ":__support_common",
- ":__support_cpp_algorithm",
- ":__support_cpp_bit",
- ":__support_cpp_limits",
- ":__support_cpp_optional",
- ":__support_cpp_string_view",
- ":__support_cpp_type_traits",
- ":__support_ctype_utils",
- ":__support_fixed_point",
- ":__support_fputil_fp_bits",
- ":__support_libc_errno",
- ":__support_macros_config",
- ":__support_macros_properties_types",
- ":__support_str_to_integer",
- ":errno",
- ":llvm_libc_macros_stdfix_macros",
- ":printf_config",
- ":printf_core_structs",
- ":types_wint_t",
- ],
-)
-
-libc_support_library(
- name = "printf_writer",
- hdrs = ["src/stdio/printf_core/writer.h"],
- textual_hdrs = ["src/stdio/printf_core/write_modes.def"],
- deps = [
- ":__support_cpp_string_view",
- ":__support_macros_config",
- ":__support_macros_optimization",
- ":printf_core_structs",
- ":string_memory_utils",
- ],
-)
-
-libc_support_library(
- name = "printf_converter",
- hdrs = [
- "src/stdio/printf_core/char_converter.h",
- "src/stdio/printf_core/converter.h",
- "src/stdio/printf_core/converter_atlas.h",
- "src/stdio/printf_core/converter_utils.h",
- "src/stdio/printf_core/float_dec_converter.h",
- "src/stdio/printf_core/float_hex_converter.h",
- "src/stdio/printf_core/float_inf_nan_converter.h",
- "src/stdio/printf_core/int_converter.h",
- "src/stdio/printf_core/ptr_converter.h",
- "src/stdio/printf_core/strerror_converter.h",
- "src/stdio/printf_core/string_converter.h",
- "src/stdio/printf_core/write_int_converter.h",
- ],
- deps = [
- ":__support_big_int",
- ":__support_common",
- ":__support_cpp_limits",
- ":__support_cpp_span",
- ":__support_cpp_string_view",
- ":__support_ctype_utils",
- ":__support_float_to_string",
- ":__support_fputil_fenv_impl",
- ":__support_fputil_fp_bits",
- ":__support_fputil_rounding_mode",
- ":__support_integer_to_string",
- ":__support_libc_assert",
- ":__support_macros_config",
- ":__support_stringutil",
- ":__support_uint128",
- ":__support_wchar_mbstate",
- ":__support_wchar_string_converter",
- ":__support_wchar_wcrtomb",
- ":hdr_limits_macros",
- ":hdr_wchar_macros",
- ":printf_config",
- ":printf_core_structs",
- ":printf_writer",
- ":string_utils",
- ":types_char32_t",
- ":types_char8_t",
- ":types_wchar_t",
- ":types_wint_t",
- ],
-)
-
-libc_support_library(
- name = "printf_error_mapper",
- hdrs = [
- "src/stdio/printf_core/error_mapper.h",
- ] + select({
- "@platforms//os:linux": [
- "src/stdio/printf_core/linux/error_mapper.h",
- ],
- "//conditions:default": ["src/stdio/printf_core/generic/error_mapper.h"],
- }),
- deps = [
- ":__support_cpp_type_traits",
- ":__support_error_or",
- ":__support_macros_properties_architectures",
- ":hdr_errno_macros",
- ":printf_core_structs",
- ],
-)
-
-libc_support_library(
- name = "printf_main",
- hdrs = ["src/stdio/printf_core/printf_main.h"],
- deps = [
- ":__support_arg_list",
- ":__support_error_or",
- ":__support_macros_config",
- ":printf_converter",
- ":printf_core_structs",
- ":printf_error_mapper",
- ":printf_parser",
- ":printf_writer",
- ],
-)
-
-libc_support_library(
- name = "vfprintf_internal",
- hdrs = ["src/stdio/printf_core/vfprintf_internal.h"],
- deps = [
- ":__support_arg_list",
- ":__support_error_or",
- ":__support_file_file",
- ":__support_macros_attributes",
- ":__support_macros_config",
- ":printf_core_structs",
- ":printf_main",
- ":printf_writer",
- ":types_FILE",
- ],
-)
-
-libc_support_library(
- name = "vasprintf_internal",
- hdrs = ["src/stdio/printf_core/vasprintf_internal.h"],
- deps = [
- ":__support_arg_list",
- ":__support_error_or",
- ":__support_macros_attributes",
- ":func_free",
- ":func_malloc",
- ":func_realloc",
- ":printf_core_structs",
- ":printf_main",
- ":printf_writer",
- ":types_FILE",
- ],
-)
-
libc_function(
name = "asprintf",
srcs = ["src/stdio/asprintf.cpp"],
@@ -15087,9 +15087,9 @@ libc_function(
":__support_cpp_limits",
":__support_libc_errno",
":__support_macros_config",
- ":printf_core_structs",
- ":printf_error_mapper",
- ":vasprintf_internal",
+ ":__support_printf_core_vasprintf_internal",
+ ":__support_printf_core_printf_core_structs",
+ ":__support_printf_core_printf_error_mapper",
],
)
@@ -15102,12 +15102,12 @@ libc_function(
":__support_cpp_limits",
":__support_libc_errno",
":__support_macros_config",
+ ":__support_printf_core_printf_config",
+ ":__support_printf_core_printf_core_structs",
+ ":__support_printf_core_printf_error_mapper",
+ ":__support_printf_core_printf_main",
+ ":__support_printf_core_printf_writer",
":errno",
- ":printf_config",
- ":printf_core_structs",
- ":printf_error_mapper",
- ":printf_main",
- ":printf_writer",
],
)
@@ -15120,11 +15120,11 @@ libc_function(
":__support_cpp_limits",
":__support_libc_errno",
":__support_macros_config",
+ ":__support_printf_core_printf_core_structs",
+ ":__support_printf_core_printf_error_mapper",
+ ":__support_printf_core_printf_main",
+ ":__support_printf_core_printf_writer",
":errno",
- ":printf_core_structs",
- ":printf_error_mapper",
- ":printf_main",
- ":printf_writer",
],
)
@@ -15137,12 +15137,12 @@ libc_function(
":__support_cpp_limits",
":__support_file_file",
":__support_macros_config",
+ ":__support_printf_core_printf_core_structs",
+ ":__support_printf_core_printf_error_mapper",
+ ":__support_printf_core_vfprintf_internal",
":errno",
- ":printf_core_structs",
- ":printf_error_mapper",
":stdout",
":types_FILE",
- ":vfprintf_internal",
],
)
@@ -15155,11 +15155,11 @@ libc_function(
":__support_cpp_limits",
":__support_file_file",
":__support_macros_config",
+ ":__support_printf_core_printf_core_structs",
+ ":__support_printf_core_printf_error_mapper",
+ ":__support_printf_core_vfprintf_internal",
":errno",
- ":printf_core_structs",
- ":printf_error_mapper",
":types_FILE",
- ":vfprintf_internal",
],
)
@@ -15172,9 +15172,9 @@ libc_function(
":__support_cpp_limits",
":__support_libc_errno",
":__support_macros_config",
- ":printf_core_structs",
- ":printf_error_mapper",
- ":vasprintf_internal",
+ ":__support_printf_core_vasprintf_internal",
+ ":__support_printf_core_printf_core_structs",
+ ":__support_printf_core_printf_error_mapper",
],
)
@@ -15187,11 +15187,11 @@ libc_function(
":__support_cpp_limits",
":__support_libc_errno",
":__support_macros_config",
+ ":__support_printf_core_printf_core_structs",
+ ":__support_printf_core_printf_error_mapper",
+ ":__support_printf_core_printf_main",
+ ":__support_printf_core_printf_writer",
":errno",
- ":printf_core_structs",
- ":printf_error_mapper",
- ":printf_main",
- ":printf_writer",
],
)
@@ -15204,11 +15204,11 @@ libc_function(
":__support_cpp_limits",
":__support_libc_errno",
":__support_macros_config",
+ ":__support_printf_core_printf_core_structs",
+ ":__support_printf_core_printf_error_mapper",
+ ":__support_printf_core_printf_main",
+ ":__support_printf_core_printf_writer",
":errno",
- ":printf_core_structs",
- ":printf_error_mapper",
- ":printf_main",
- ":printf_writer",
],
)
@@ -15221,12 +15221,12 @@ libc_function(
":__support_cpp_limits",
":__support_file_file",
":__support_macros_config",
+ ":__support_printf_core_printf_core_structs",
+ ":__support_printf_core_printf_error_mapper",
+ ":__support_printf_core_vfprintf_internal",
":errno",
- ":printf_core_structs",
- ":printf_error_mapper",
":stdout",
":types_FILE",
- ":vfprintf_internal",
],
)
@@ -15239,11 +15239,11 @@ libc_function(
":__support_cpp_limits",
":__support_file_file",
":__support_macros_config",
+ ":__support_printf_core_printf_core_structs",
+ ":__support_printf_core_printf_error_mapper",
+ ":__support_printf_core_vfprintf_internal",
":errno",
- ":printf_core_structs",
- ":printf_error_mapper",
":types_FILE",
- ":vfprintf_internal",
],
)
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/__support/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/__support/BUILD.bazel
index 0698f45ceabc9..72e0c6135c9ec 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/__support/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/__support/BUILD.bazel
@@ -121,3 +121,40 @@ libc_test(
"//libc:__support_macros_properties_types",
],
)
+
+libc_test(
+ name = "printf_parser_test",
+ srcs = ["printf_core/parser_test.cpp"],
+ deps = [
+ "//libc:__support_arg_list",
+ "//libc:__support_cpp_bit",
+ "//libc:__support_cpp_string_view",
+ "//libc:__support_printf_core_printf_core_structs",
+ "//libc:__support_printf_core_printf_parser",
+ "//libc/test/UnitTest:printf_matcher",
+ ],
+)
+
+libc_test(
+ name = "printf_writer_test",
+ srcs = ["printf_core/writer_test.cpp"],
+ deps = [
+ "//libc:__support_arg_list",
+ "//libc:__support_cpp_string_view",
+ "//libc:__support_printf_core_printf_core_structs",
+ "//libc:__support_printf_core_printf_writer",
+ "//libc:string_memory_utils",
+ ],
+)
+
+libc_test(
+ name = "printf_converter_test",
+ srcs = ["printf_core/converter_test.cpp"],
+ deps = [
+ "//libc:__support_arg_list",
+ "//libc:__support_cpp_string_view",
+ "//libc:__support_printf_core_printf_converter",
+ "//libc:__support_printf_core_printf_core_structs",
+ "//libc:printf_writer",
+ ],
+)
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/stdio/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/stdio/BUILD.bazel
index f9d3c4288b1f1..c91ff004bb33b 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/stdio/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/stdio/BUILD.bazel
@@ -10,43 +10,6 @@ package(default_visibility = ["//visibility:public"])
licenses(["notice"])
-libc_test(
- name = "printf_parser_test",
- srcs = ["printf_core/parser_test.cpp"],
- deps = [
- "//libc:__support_arg_list",
- "//libc:__support_cpp_bit",
- "//libc:__support_cpp_string_view",
- "//libc:printf_core_structs",
- "//libc:printf_parser",
- "//libc/test/UnitTest:printf_matcher",
- ],
-)
-
-libc_test(
- name = "printf_writer_test",
- srcs = ["printf_core/writer_test.cpp"],
- deps = [
- "//libc:__support_arg_list",
- "//libc:__support_cpp_string_view",
- "//libc:printf_core_structs",
- "//libc:printf_writer",
- "//libc:string_memory_utils",
- ],
-)
-
-libc_test(
- name = "printf_converter_test",
- srcs = ["printf_core/converter_test.cpp"],
- deps = [
- "//libc:__support_arg_list",
- "//libc:__support_cpp_string_view",
- "//libc:printf_converter",
- "//libc:printf_core_structs",
- "//libc:printf_writer",
- ],
-)
-
libc_test(
name = "asprintf_test",
srcs = ["asprintf_test.cpp"],
More information about the llvm-commits
mailing list