Skip to content

Commit 69ecbfc

Browse files
clean up unnecessary includes.
1 parent 53b35cc commit 69ecbfc

15 files changed

+2
-28
lines changed

libc/src/stdio/printf_core/char_converter.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_CHAR_CONVERTER_H
1010
#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_CHAR_CONVERTER_H
1111

12-
#include "src/__support/CPP/string_view.h"
13-
#include "src/__support/common.h"
1412
#include "src/stdio/printf_core/converter_utils.h"
1513
#include "src/stdio/printf_core/core_structs.h"
1614
#include "src/stdio/printf_core/writer.h"
@@ -21,10 +19,10 @@ namespace printf_core {
2119
LIBC_INLINE int convert_char(Writer *writer, const FormatSection &to_conv) {
2220
char c = static_cast<char>(to_conv.conv_val_raw);
2321

24-
constexpr int string_len = 1;
22+
constexpr int STRING_LEN = 1;
2523

2624
size_t padding_spaces =
27-
to_conv.min_width > string_len ? to_conv.min_width - string_len : 0;
25+
to_conv.min_width > STRING_LEN ? to_conv.min_width - STRING_LEN : 0;
2826

2927
// If the padding is on the left side, write the spaces first.
3028
if (padding_spaces > 0 &&

libc/src/stdio/printf_core/converter_utils.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_CONVERTER_UTILS_H
1111

1212
#include "src/__support/CPP/limits.h"
13-
#include "src/__support/common.h"
1413
#include "src/stdio/printf_core/core_structs.h"
1514

1615
#include <inttypes.h>

libc/src/stdio/printf_core/float_dec_converter.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,9 @@
1010
#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_FLOAT_DEC_CONVERTER_H
1111

1212
#include "src/__support/CPP/string_view.h"
13-
#include "src/__support/FPUtil/FEnvImpl.h"
1413
#include "src/__support/FPUtil/FPBits.h"
1514
#include "src/__support/FPUtil/FloatProperties.h"
1615
#include "src/__support/FPUtil/rounding_mode.h"
17-
#include "src/__support/UInt.h"
18-
#include "src/__support/UInt128.h"
19-
#include "src/__support/common.h"
2016
#include "src/__support/float_to_string.h"
2117
#include "src/__support/integer_to_string.h"
2218
#include "src/__support/libc_assert.h"

libc/src/stdio/printf_core/float_hex_converter.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@
1010
#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_FLOAT_HEX_CONVERTER_H
1111

1212
#include "src/__support/CPP/string_view.h"
13-
#include "src/__support/FPUtil/FEnvImpl.h"
1413
#include "src/__support/FPUtil/FPBits.h"
1514
#include "src/__support/FPUtil/rounding_mode.h"
16-
#include "src/__support/common.h"
1715
#include "src/stdio/printf_core/converter_utils.h"
1816
#include "src/stdio/printf_core/core_structs.h"
1917
#include "src/stdio/printf_core/float_inf_nan_converter.h"

libc/src/stdio/printf_core/float_inf_nan_converter.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_FLOAT_INF_NAN_CONVERTER_H
1111

1212
#include "src/__support/FPUtil/FPBits.h"
13-
#include "src/__support/common.h"
1413
#include "src/stdio/printf_core/converter_utils.h"
1514
#include "src/stdio/printf_core/core_structs.h"
1615
#include "src/stdio/printf_core/writer.h"

libc/src/stdio/printf_core/int_converter.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
#include "src/__support/CPP/span.h"
1313
#include "src/__support/CPP/string_view.h"
14-
#include "src/__support/common.h"
1514
#include "src/__support/integer_to_string.h"
1615
#include "src/stdio/printf_core/converter_utils.h"
1716
#include "src/stdio/printf_core/core_structs.h"

libc/src/stdio/printf_core/parser.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_PARSER_H
1111

1212
#include "src/__support/CPP/optional.h"
13-
#include "src/__support/CPP/type_traits.h"
14-
#include "src/__support/arg_list.h"
15-
#include "src/__support/common.h"
1613
#include "src/__support/str_to_integer.h"
1714
#include "src/stdio/printf_core/core_structs.h"
1815
#include "src/stdio/printf_core/printf_config.h"

libc/src/stdio/printf_core/ptr_converter.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_PTR_CONVERTER_H
1010
#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_PTR_CONVERTER_H
1111

12-
#include "src/__support/CPP/string_view.h"
13-
#include "src/__support/common.h"
14-
#include "src/stdio/printf_core/converter_utils.h"
1512
#include "src/stdio/printf_core/core_structs.h"
1613
#include "src/stdio/printf_core/int_converter.h"
1714
#include "src/stdio/printf_core/string_converter.h"

libc/src/stdio/printf_core/string_converter.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_STRING_CONVERTER_H
1111

1212
#include "src/__support/CPP/string_view.h"
13-
#include "src/__support/common.h"
1413
#include "src/stdio/printf_core/converter_utils.h"
1514
#include "src/stdio/printf_core/core_structs.h"
1615
#include "src/stdio/printf_core/writer.h"

libc/src/stdio/printf_core/write_int_converter.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#ifndef LLVM_LIBC_SRC_STDIO_PRINTF_CORE_WRITE_INT_CONVERTER_H
1010
#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_WRITE_INT_CONVERTER_H
1111

12-
#include "src/__support/CPP/limits.h"
1312
#include "src/stdio/printf_core/core_structs.h"
1413
#include "src/stdio/printf_core/writer.h"
1514

libc/src/stdio/printf_core/writer.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88

99
#include "writer.h"
1010
#include "src/__support/CPP/string_view.h"
11-
#include "src/__support/macros/optimization.h"
1211
#include "src/stdio/printf_core/core_structs.h"
13-
#include "src/string/memory_utils/inline_memcpy.h"
1412
#include "src/string/memory_utils/inline_memset.h"
1513
#include <stddef.h>
1614

libc/src/stdio/scanf_core/converter_utils.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
99
#ifndef LLVM_LIBC_SRC_STDIO_SCANF_CORE_CONVERTER_UTILS_H
1010
#define LLVM_LIBC_SRC_STDIO_SCANF_CORE_CONVERTER_UTILS_H
1111

12-
#include "src/__support/common.h"
1312
#include "src/__support/ctype_utils.h"
1413
#include "src/__support/str_to_float.h"
1514
#include "src/stdio/scanf_core/core_structs.h"
16-
#include "src/stdio/scanf_core/reader.h"
1715

1816
#include <stddef.h>
1917

libc/src/stdio/scanf_core/core_structs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
#include "src/__support/CPP/bitset.h"
1313
#include "src/__support/CPP/string_view.h"
14-
#include "src/__support/FPUtil/FPBits.h"
1514

1615
#include <inttypes.h>
1716
#include <stddef.h>

libc/src/stdio/scanf_core/current_pos_converter.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#ifndef LLVM_LIBC_SRC_STDIO_SCANF_CORE_CURRENT_POS_CONVERTER_H
1010
#define LLVM_LIBC_SRC_STDIO_SCANF_CORE_CURRENT_POS_CONVERTER_H
1111

12-
#include "src/__support/common.h"
1312
#include "src/stdio/scanf_core/converter_utils.h"
1413
#include "src/stdio/scanf_core/core_structs.h"
1514
#include "src/stdio/scanf_core/reader.h"

libc/src/stdio/scanf_core/parser.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#define LLVM_LIBC_SRC_STDIO_SCANF_CORE_PARSER_H
1111

1212
#include "src/__support/arg_list.h"
13-
#include "src/__support/common.h"
1413
#include "src/__support/ctype_utils.h"
1514
#include "src/__support/str_to_integer.h"
1615
#include "src/stdio/scanf_core/core_structs.h"

0 commit comments

Comments
 (0)