Skip to content

Commit 09efe84

Browse files
authored
[libc][NFC] Rename UInt.h to big_int.h and UInt128.h to uint128.h for consistency (#87808)
1 parent a522dbb commit 09efe84

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+68
-68
lines changed

libc/fuzzing/__support/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ add_libc_fuzzer(
33
SRCS
44
uint_fuzz.cpp
55
DEPENDS
6-
libc.src.__support.uint
6+
libc.src.__support.big_int
77
)

libc/fuzzing/__support/uint_fuzz.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "src/__support/CPP/bit.h"
2-
#include "src/__support/UInt.h"
2+
#include "src/__support/big_int.h"
33
#include "src/string/memory_utils/inline_memcpy.h"
44

55
using namespace LIBC_NAMESPACE;

libc/src/__support/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ add_header_library(
104104
HDRS
105105
integer_to_string.h
106106
DEPENDS
107-
.uint
107+
.big_int
108108
libc.src.__support.common
109109
libc.src.__support.CPP.algorithm
110110
libc.src.__support.CPP.limits
@@ -204,9 +204,9 @@ add_header_library(
204204
)
205205

206206
add_header_library(
207-
uint
207+
big_int
208208
HDRS
209-
UInt.h
209+
big_int.h
210210
DEPENDS
211211
.math_extras
212212
.number_pair
@@ -220,9 +220,9 @@ add_header_library(
220220
add_header_library(
221221
uint128
222222
HDRS
223-
UInt128.h
223+
uint128.h
224224
DEPENDS
225-
.uint
225+
.big_int
226226
libc.src.__support.macros.properties.types
227227
)
228228

libc/src/__support/FPUtil/BasicOperations.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
#include "FEnvImpl.h"
1616
#include "src/__support/CPP/type_traits.h"
17-
#include "src/__support/UInt128.h"
1817
#include "src/__support/common.h"
1918
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
19+
#include "src/__support/uint128.h"
2020

2121
namespace LIBC_NAMESPACE {
2222
namespace fputil {

libc/src/__support/FPUtil/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ add_header_library(
200200
DEPENDS
201201
.fp_bits
202202
.multiply_add
203+
libc.src.__support.big_int
203204
libc.src.__support.common
204-
libc.src.__support.uint
205205
libc.src.__support.macros.optimization
206206
)
207207

libc/src/__support/FPUtil/FPBits.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111

1212
#include "src/__support/CPP/bit.h"
1313
#include "src/__support/CPP/type_traits.h"
14-
#include "src/__support/UInt128.h"
1514
#include "src/__support/common.h"
1615
#include "src/__support/libc_assert.h" // LIBC_ASSERT
1716
#include "src/__support/macros/attributes.h" // LIBC_INLINE, LIBC_INLINE_VAR
1817
#include "src/__support/macros/properties/types.h" // LIBC_TYPES_HAS_FLOAT128
1918
#include "src/__support/math_extras.h" // mask_trailing_ones
2019
#include "src/__support/sign.h" // Sign
20+
#include "src/__support/uint128.h"
2121

2222
#include <stdint.h>
2323

libc/src/__support/FPUtil/Hypot.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#include "rounding_mode.h"
1616
#include "src/__support/CPP/bit.h"
1717
#include "src/__support/CPP/type_traits.h"
18-
#include "src/__support/UInt128.h"
1918
#include "src/__support/common.h"
19+
#include "src/__support/uint128.h"
2020

2121
namespace LIBC_NAMESPACE {
2222
namespace fputil {

libc/src/__support/FPUtil/dyadic_float.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "FPBits.h"
1313
#include "multiply_add.h"
1414
#include "src/__support/CPP/type_traits.h"
15-
#include "src/__support/UInt.h"
15+
#include "src/__support/big_int.h"
1616
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
1717

1818
#include <stddef.h>

libc/src/__support/FPUtil/generic/FMA.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
#include "src/__support/FPUtil/FEnvImpl.h"
1515
#include "src/__support/FPUtil/FPBits.h"
1616
#include "src/__support/FPUtil/rounding_mode.h"
17-
#include "src/__support/UInt128.h"
1817
#include "src/__support/macros/attributes.h" // LIBC_INLINE
1918
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
19+
#include "src/__support/uint128.h"
2020

2121
namespace LIBC_NAMESPACE {
2222
namespace fputil {

libc/src/__support/FPUtil/generic/sqrt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#include "src/__support/FPUtil/FEnvImpl.h"
1616
#include "src/__support/FPUtil/FPBits.h"
1717
#include "src/__support/FPUtil/rounding_mode.h"
18-
#include "src/__support/UInt128.h"
1918
#include "src/__support/common.h"
19+
#include "src/__support/uint128.h"
2020

2121
namespace LIBC_NAMESPACE {
2222
namespace fputil {

libc/src/__support/FPUtil/generic/sqrt_80_bit_long_double.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#include "src/__support/FPUtil/FEnvImpl.h"
1414
#include "src/__support/FPUtil/FPBits.h"
1515
#include "src/__support/FPUtil/rounding_mode.h"
16-
#include "src/__support/UInt128.h"
1716
#include "src/__support/common.h"
17+
#include "src/__support/uint128.h"
1818

1919
namespace LIBC_NAMESPACE {
2020
namespace fputil {
File renamed without changes.

libc/src/__support/float_to_string.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "src/__support/CPP/type_traits.h"
1616
#include "src/__support/FPUtil/FPBits.h"
1717
#include "src/__support/FPUtil/dyadic_float.h"
18-
#include "src/__support/UInt.h"
18+
#include "src/__support/big_int.h"
1919
#include "src/__support/common.h"
2020
#include "src/__support/libc_assert.h"
2121
#include "src/__support/macros/attributes.h"

libc/src/__support/hash.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
#include "src/__support/CPP/bit.h" // rotl
1313
#include "src/__support/CPP/limits.h" // numeric_limits
14-
#include "src/__support/UInt128.h" // UInt128
1514
#include "src/__support/macros/attributes.h" // LIBC_INLINE
15+
#include "src/__support/uint128.h" // UInt128
1616
#include <stdint.h> // For uint64_t
1717

1818
namespace LIBC_NAMESPACE {

libc/src/__support/integer_literals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#define LLVM_LIBC_SRC___SUPPORT_INTEGER_LITERALS_H
1515

1616
#include "src/__support/CPP/limits.h" // CHAR_BIT
17-
#include "src/__support/UInt128.h" // UInt128
1817
#include "src/__support/macros/attributes.h" // LIBC_INLINE
18+
#include "src/__support/uint128.h" // UInt128
1919
#include <stddef.h> // size_t
2020
#include <stdint.h> // uintxx_t
2121

libc/src/__support/integer_to_string.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
#include "src/__support/CPP/span.h"
6868
#include "src/__support/CPP/string_view.h"
6969
#include "src/__support/CPP/type_traits.h"
70-
#include "src/__support/UInt.h" // make_integral_or_big_int_unsigned_t
70+
#include "src/__support/big_int.h" // make_integral_or_big_int_unsigned_t
7171
#include "src/__support/common.h"
7272

7373
namespace LIBC_NAMESPACE {

libc/src/__support/str_to_float.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
#include "src/__support/FPUtil/FPBits.h"
1818
#include "src/__support/FPUtil/dyadic_float.h"
1919
#include "src/__support/FPUtil/rounding_mode.h"
20-
#include "src/__support/UInt128.h"
2120
#include "src/__support/common.h"
2221
#include "src/__support/ctype_utils.h"
2322
#include "src/__support/detailed_powers_of_ten.h"
2423
#include "src/__support/high_precision_decimal.h"
2524
#include "src/__support/str_to_integer.h"
2625
#include "src/__support/str_to_num_result.h"
26+
#include "src/__support/uint128.h"
2727
#include "src/errno/libc_errno.h" // For ERANGE
2828

2929
namespace LIBC_NAMESPACE {

libc/src/__support/str_to_integer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
#include "src/__support/CPP/limits.h"
1313
#include "src/__support/CPP/type_traits.h"
14-
#include "src/__support/UInt128.h"
1514
#include "src/__support/common.h"
1615
#include "src/__support/ctype_utils.h"
1716
#include "src/__support/str_to_num_result.h"
17+
#include "src/__support/uint128.h"
1818
#include "src/errno/libc_errno.h" // For ERANGE
1919

2020
namespace LIBC_NAMESPACE {

libc/src/__support/UInt128.h renamed to libc/src/__support/uint128.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC___SUPPORT_UINT128_H
1010
#define LLVM_LIBC_SRC___SUPPORT_UINT128_H
1111

12-
#include "UInt.h"
12+
#include "big_int.h"
1313
#include "src/__support/macros/properties/types.h" // LIBC_TYPES_HAS_INT128
1414

1515
#ifdef LIBC_TYPES_HAS_INT128

libc/src/math/generic/log_range_reduction.h

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

1212
#include "common_constants.h"
1313
#include "src/__support/FPUtil/dyadic_float.h"
14-
#include "src/__support/UInt128.h"
14+
#include "src/__support/uint128.h"
1515

1616
namespace LIBC_NAMESPACE {
1717

libc/src/stdio/printf_core/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,21 +82,21 @@ add_object_library(
8282
float_dec_converter.h
8383
fixed_converter.h #TODO: Check if this should be disabled when fixed unavail
8484
DEPENDS
85-
.writer
8685
.core_structs
8786
.printf_config
87+
.writer
88+
libc.src.__support.big_int
89+
libc.src.__support.common
8890
libc.src.__support.CPP.limits
8991
libc.src.__support.CPP.span
9092
libc.src.__support.CPP.string_view
91-
libc.src.__support.FPUtil.fp_bits
93+
libc.src.__support.float_to_string
9294
libc.src.__support.FPUtil.fenv_impl
95+
libc.src.__support.FPUtil.fp_bits
9396
libc.src.__support.FPUtil.rounding_mode
94-
libc.src.__support.common
97+
libc.src.__support.integer_to_string
9598
libc.src.__support.libc_assert
96-
libc.src.__support.uint
9799
libc.src.__support.uint128
98-
libc.src.__support.integer_to_string
99-
libc.src.__support.float_to_string
100100
)
101101

102102

libc/src/stdio/printf_core/float_dec_converter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "src/__support/CPP/string_view.h"
1313
#include "src/__support/FPUtil/FPBits.h"
1414
#include "src/__support/FPUtil/rounding_mode.h"
15-
#include "src/__support/UInt.h" // is_big_int_v
15+
#include "src/__support/big_int.h" // is_big_int_v
1616
#include "src/__support/float_to_string.h"
1717
#include "src/__support/integer_to_string.h"
1818
#include "src/__support/libc_assert.h"

libc/test/UnitTest/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ add_unittest_framework_library(
6868
Test.h
6969
TestLogger.h
7070
DEPENDS
71+
libc.src.__support.big_int
7172
libc.src.__support.c_string
7273
libc.src.__support.CPP.string
7374
libc.src.__support.CPP.string_view
7475
libc.src.__support.CPP.type_traits
7576
libc.src.__support.fixed_point.fx_rep
7677
libc.src.__support.macros.properties.types
7778
libc.src.__support.OSUtil.osutil
78-
libc.src.__support.uint
7979
libc.src.__support.uint128
8080
)
8181

@@ -103,9 +103,9 @@ add_header_library(
103103
HDRS
104104
StringUtils.h
105105
DEPENDS
106+
libc.src.__support.big_int
106107
libc.src.__support.CPP.string
107108
libc.src.__support.CPP.type_traits
108-
libc.src.__support.uint
109109
)
110110

111111
add_unittest_framework_library(

libc/test/UnitTest/LibcTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
#include "include/llvm-libc-macros/stdfix-macros.h"
1212
#include "src/__support/CPP/string.h"
1313
#include "src/__support/CPP/string_view.h"
14-
#include "src/__support/UInt128.h"
1514
#include "src/__support/fixed_point/fx_rep.h"
1615
#include "src/__support/macros/properties/types.h" // LIBC_TYPES_HAS_INT128
16+
#include "src/__support/uint128.h"
1717
#include "test/UnitTest/TestLogger.h"
1818

1919
#if __STDC_HOSTED__

libc/test/UnitTest/StringUtils.h

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

1212
#include "src/__support/CPP/string.h"
1313
#include "src/__support/CPP/type_traits.h"
14-
#include "src/__support/UInt.h"
14+
#include "src/__support/big_int.h"
1515

1616
namespace LIBC_NAMESPACE {
1717

libc/test/UnitTest/TestLogger.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#include "test/UnitTest/TestLogger.h"
22
#include "src/__support/CPP/string.h"
33
#include "src/__support/CPP/string_view.h"
4-
#include "src/__support/OSUtil/io.h" // write_to_stderr
5-
#include "src/__support/UInt.h" // is_big_int
6-
#include "src/__support/UInt128.h"
4+
#include "src/__support/OSUtil/io.h" // write_to_stderr
5+
#include "src/__support/big_int.h" // is_big_int
76
#include "src/__support/macros/properties/types.h" // LIBC_TYPES_HAS_INT128
7+
#include "src/__support/uint128.h"
88

99
#include <stdint.h>
1010

libc/test/src/__support/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ add_libc_test(
7878
SRCS
7979
integer_to_string_test.cpp
8080
DEPENDS
81+
libc.src.__support.big_int
8182
libc.src.__support.CPP.limits
8283
libc.src.__support.CPP.string_view
8384
libc.src.__support.integer_literals
8485
libc.src.__support.integer_to_string
85-
libc.src.__support.uint
8686
libc.src.__support.uint128
8787
)
8888

@@ -107,9 +107,9 @@ if(NOT LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
107107
SRCS
108108
uint_test.cpp
109109
DEPENDS
110+
libc.src.__support.big_int
110111
libc.src.__support.CPP.optional
111112
libc.src.__support.macros.properties.types
112-
libc.src.__support.uint
113113
)
114114
endif()
115115

libc/test/src/__support/CPP/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ add_libc_test(
1717
SRCS
1818
bit_test.cpp
1919
DEPENDS
20+
libc.src.__support.big_int
2021
libc.src.__support.CPP.bit
2122
libc.src.__support.macros.properties.types
22-
libc.src.__support.uint
2323
)
2424

2525
add_libc_test(
@@ -59,9 +59,9 @@ add_libc_test(
5959
SRCS
6060
limits_test.cpp
6161
DEPENDS
62+
libc.src.__support.big_int
6263
libc.src.__support.CPP.limits
6364
libc.src.__support.macros.properties.types
64-
libc.src.__support.uint
6565
)
6666

6767
add_libc_test(

libc/test/src/__support/CPP/bit_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "src/__support/CPP/bit.h"
10-
#include "src/__support/UInt.h"
10+
#include "src/__support/big_int.h"
1111
#include "src/__support/macros/properties/types.h" // LIBC_TYPES_HAS_INT128
1212
#include "test/UnitTest/Test.h"
1313

libc/test/src/__support/CPP/limits_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "src/__support/CPP/limits.h"
10-
#include "src/__support/UInt.h"
10+
#include "src/__support/big_int.h"
1111
#include "src/__support/macros/properties/types.h" // LIBC_TYPES_HAS_INT128
1212
#include "test/UnitTest/Test.h"
1313

libc/test/src/__support/FPUtil/dyadic_float_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "src/__support/FPUtil/dyadic_float.h"
10-
#include "src/__support/UInt.h"
10+
#include "src/__support/big_int.h"
1111
#include "test/UnitTest/FPMatcher.h"
1212
#include "test/UnitTest/Test.h"
1313
#include "utils/MPFRWrapper/MPFRUtils.h"

libc/test/src/__support/high_precision_decimal_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "src/__support/UInt128.h"
109
#include "src/__support/high_precision_decimal.h"
10+
#include "src/__support/uint128.h"
1111

1212
#include "test/UnitTest/Test.h"
1313

0 commit comments

Comments
 (0)