[libc] Migrate printf_core from stdio/ to __support/. (#208303)
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.
This commit is contained in:
parent
e55d3bca36
commit
c3373183d2
83 changed files with 566 additions and 555 deletions
|
|
@ -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
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -462,6 +462,8 @@ add_subdirectory(threads)
|
|||
|
||||
add_subdirectory(File)
|
||||
|
||||
add_subdirectory(printf_core)
|
||||
|
||||
add_subdirectory(HashTable)
|
||||
|
||||
add_subdirectory(fixed_point)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
if(NOT LLVM_LIBC_FULL_BUILD)
|
||||
set(use_system_file "COMPILE_OPTIONS")
|
||||
libc_add_definition(use_system_file "LIBC_COPT_STDIO_USE_SYSTEM_FILE")
|
||||
endif()
|
||||
|
||||
if(LIBC_CONF_PRINTF_DISABLE_FLOAT)
|
||||
libc_add_definition(printf_config_copts "LIBC_COPT_PRINTF_DISABLE_FLOAT")
|
||||
endif()
|
||||
|
|
@ -41,9 +46,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 +183,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 +210,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}
|
||||
)
|
||||
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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() {}
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
)
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
)
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -16,9 +16,9 @@
|
|||
#include "src/__support/CPP/type_traits.h"
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/__support/macros/properties/types.h"
|
||||
#include "src/__support/printf_core/core_structs.h"
|
||||
#include "src/__support/printf_core/printf_config.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 <stddef.h>
|
||||
|
||||
|
|
@ -758,4 +758,4 @@ private:
|
|||
} // 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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -14,8 +14,8 @@ add_object_library(
|
|||
libc.src.__support.libc_errno
|
||||
libc.src.__support.OSUtil.osutil
|
||||
libc.src.__support.StringUtil.error_to_string
|
||||
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
|
||||
libc.src.__support.CPP.string_view
|
||||
libc.src.__support.macros.config
|
||||
)
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@
|
|||
#include "src/__support/arg_list.h"
|
||||
#include "src/__support/libc_errno.h"
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/stdio/printf_core/printf_main.h"
|
||||
#include "src/stdio/printf_core/writer.h"
|
||||
#include "src/__support/printf_core/printf_main.h"
|
||||
#include "src/__support/printf_core/writer.h"
|
||||
|
||||
#ifdef __linux__
|
||||
extern "C" char *program_invocation_short_name;
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@
|
|||
#include "src/__support/arg_list.h"
|
||||
#include "src/__support/libc_errno.h"
|
||||
#include "src/__support/macros/config.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/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"
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
)
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@
|
|||
|
||||
#include "src/__support/CPP/type_traits.h"
|
||||
#include "src/__support/macros/config.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 "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 <stddef.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -194,9 +194,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(
|
||||
|
|
@ -209,9 +209,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(
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -863,9 +863,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()
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
)
|
||||
|
|
@ -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"
|
||||
|
||||
|
|
@ -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>
|
||||
|
||||
|
|
@ -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"
|
||||
|
|
@ -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
|
||||
|
|
@ -609,6 +609,5 @@ if(LIBC_TARGET_OS_IS_GPU)
|
|||
return()
|
||||
endif()
|
||||
|
||||
add_subdirectory(printf_core)
|
||||
add_subdirectory(scanf_core)
|
||||
add_subdirectory(testdata)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -2064,6 +2064,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"],
|
||||
|
|
@ -13908,10 +14082,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",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -13923,8 +14097,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",
|
||||
],
|
||||
)
|
||||
|
|
@ -13937,8 +14111,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",
|
||||
],
|
||||
)
|
||||
|
|
@ -13951,8 +14125,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",
|
||||
],
|
||||
)
|
||||
|
|
@ -15298,180 +15472,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"],
|
||||
|
|
@ -15481,9 +15481,9 @@ libc_function(
|
|||
":__support_cpp_limits",
|
||||
":__support_libc_errno",
|
||||
":__support_macros_config",
|
||||
":printf_core_structs",
|
||||
":printf_error_mapper",
|
||||
":vasprintf_internal",
|
||||
":__support_printf_core_printf_core_structs",
|
||||
":__support_printf_core_printf_error_mapper",
|
||||
":__support_printf_core_vasprintf_internal",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -15496,12 +15496,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",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -15514,11 +15514,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",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -15531,12 +15531,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",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -15549,11 +15549,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",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -15566,9 +15566,9 @@ libc_function(
|
|||
":__support_cpp_limits",
|
||||
":__support_libc_errno",
|
||||
":__support_macros_config",
|
||||
":printf_core_structs",
|
||||
":printf_error_mapper",
|
||||
":vasprintf_internal",
|
||||
":__support_printf_core_printf_core_structs",
|
||||
":__support_printf_core_printf_error_mapper",
|
||||
":__support_printf_core_vasprintf_internal",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -15581,11 +15581,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",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -15598,11 +15598,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",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -15615,12 +15615,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",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -15633,11 +15633,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",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -152,9 +152,9 @@ libc_test_library(
|
|||
":string_utils",
|
||||
"//libc:__support_fputil_fp_bits",
|
||||
"//libc:__support_macros_config",
|
||||
"//libc:__support_printf_core_printf_config",
|
||||
"//libc:__support_printf_core_printf_core_structs",
|
||||
"//libc:hdr_stdint_proxy",
|
||||
"//libc:printf_config",
|
||||
"//libc:printf_core_structs",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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:__support_printf_core_printf_writer",
|
||||
],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
|
|
@ -62,8 +25,8 @@ libc_test(
|
|||
srcs = ["sprintf_test.cpp"],
|
||||
deps = [
|
||||
"//libc:__support_fputil_fp_bits",
|
||||
"//libc:__support_printf_core_printf_config",
|
||||
"//libc:hdr_wchar_macros",
|
||||
"//libc:printf_config",
|
||||
"//libc:sprintf",
|
||||
"//libc:types_wint_t",
|
||||
"//libc/test/UnitTest:fp_test_helpers",
|
||||
|
|
|
|||
Loading…
Reference in a new issue