Skip to content

[libc][NFC] Rename UInt.h to big_int.h and UInt128.h to uint128.h for consistency #87808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libc/fuzzing/__support/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ add_libc_fuzzer(
SRCS
uint_fuzz.cpp
DEPENDS
libc.src.__support.uint
libc.src.__support.big_int
)
2 changes: 1 addition & 1 deletion libc/fuzzing/__support/uint_fuzz.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "src/__support/CPP/bit.h"
#include "src/__support/UInt.h"
#include "src/__support/big_int.h"
#include "src/string/memory_utils/inline_memcpy.h"

using namespace LIBC_NAMESPACE;
Expand Down
10 changes: 5 additions & 5 deletions libc/src/__support/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ add_header_library(
HDRS
integer_to_string.h
DEPENDS
.uint
.big_int
libc.src.__support.common
libc.src.__support.CPP.algorithm
libc.src.__support.CPP.limits
Expand Down Expand Up @@ -204,9 +204,9 @@ add_header_library(
)

add_header_library(
uint
big_int
HDRS
UInt.h
big_int.h
DEPENDS
.math_extras
.number_pair
Expand All @@ -220,9 +220,9 @@ add_header_library(
add_header_library(
uint128
HDRS
UInt128.h
uint128.h
DEPENDS
.uint
.big_int
libc.src.__support.macros.properties.types
)

Expand Down
2 changes: 1 addition & 1 deletion libc/src/__support/FPUtil/BasicOperations.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

#include "FEnvImpl.h"
#include "src/__support/CPP/type_traits.h"
#include "src/__support/UInt128.h"
#include "src/__support/common.h"
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
#include "src/__support/uint128.h"

namespace LIBC_NAMESPACE {
namespace fputil {
Expand Down
2 changes: 1 addition & 1 deletion libc/src/__support/FPUtil/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ add_header_library(
DEPENDS
.fp_bits
.multiply_add
libc.src.__support.big_int
libc.src.__support.common
libc.src.__support.uint
libc.src.__support.macros.optimization
)

Expand Down
2 changes: 1 addition & 1 deletion libc/src/__support/FPUtil/FPBits.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

#include "src/__support/CPP/bit.h"
#include "src/__support/CPP/type_traits.h"
#include "src/__support/UInt128.h"
#include "src/__support/common.h"
#include "src/__support/libc_assert.h" // LIBC_ASSERT
#include "src/__support/macros/attributes.h" // LIBC_INLINE, LIBC_INLINE_VAR
#include "src/__support/macros/properties/types.h" // LIBC_TYPES_HAS_FLOAT128
#include "src/__support/math_extras.h" // mask_trailing_ones
#include "src/__support/sign.h" // Sign
#include "src/__support/uint128.h"

#include <stdint.h>

Expand Down
2 changes: 1 addition & 1 deletion libc/src/__support/FPUtil/Hypot.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#include "rounding_mode.h"
#include "src/__support/CPP/bit.h"
#include "src/__support/CPP/type_traits.h"
#include "src/__support/UInt128.h"
#include "src/__support/common.h"
#include "src/__support/uint128.h"

namespace LIBC_NAMESPACE {
namespace fputil {
Expand Down
2 changes: 1 addition & 1 deletion libc/src/__support/FPUtil/dyadic_float.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "FPBits.h"
#include "multiply_add.h"
#include "src/__support/CPP/type_traits.h"
#include "src/__support/UInt.h"
#include "src/__support/big_int.h"
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY

#include <stddef.h>
Expand Down
2 changes: 1 addition & 1 deletion libc/src/__support/FPUtil/generic/FMA.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/FPUtil/rounding_mode.h"
#include "src/__support/UInt128.h"
#include "src/__support/macros/attributes.h" // LIBC_INLINE
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
#include "src/__support/uint128.h"

namespace LIBC_NAMESPACE {
namespace fputil {
Expand Down
2 changes: 1 addition & 1 deletion libc/src/__support/FPUtil/generic/sqrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/FPUtil/rounding_mode.h"
#include "src/__support/UInt128.h"
#include "src/__support/common.h"
#include "src/__support/uint128.h"

namespace LIBC_NAMESPACE {
namespace fputil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/FPUtil/rounding_mode.h"
#include "src/__support/UInt128.h"
#include "src/__support/common.h"
#include "src/__support/uint128.h"

namespace LIBC_NAMESPACE {
namespace fputil {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion libc/src/__support/float_to_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "src/__support/CPP/type_traits.h"
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/FPUtil/dyadic_float.h"
#include "src/__support/UInt.h"
#include "src/__support/big_int.h"
#include "src/__support/common.h"
#include "src/__support/libc_assert.h"
#include "src/__support/macros/attributes.h"
Expand Down
2 changes: 1 addition & 1 deletion libc/src/__support/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

#include "src/__support/CPP/bit.h" // rotl
#include "src/__support/CPP/limits.h" // numeric_limits
#include "src/__support/UInt128.h" // UInt128
#include "src/__support/macros/attributes.h" // LIBC_INLINE
#include "src/__support/uint128.h" // UInt128
#include <stdint.h> // For uint64_t

namespace LIBC_NAMESPACE {
Expand Down
2 changes: 1 addition & 1 deletion libc/src/__support/integer_literals.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#define LLVM_LIBC_SRC___SUPPORT_INTEGER_LITERALS_H

#include "src/__support/CPP/limits.h" // CHAR_BIT
#include "src/__support/UInt128.h" // UInt128
#include "src/__support/macros/attributes.h" // LIBC_INLINE
#include "src/__support/uint128.h" // UInt128
#include <stddef.h> // size_t
#include <stdint.h> // uintxx_t

Expand Down
2 changes: 1 addition & 1 deletion libc/src/__support/integer_to_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
#include "src/__support/CPP/span.h"
#include "src/__support/CPP/string_view.h"
#include "src/__support/CPP/type_traits.h"
#include "src/__support/UInt.h" // make_integral_or_big_int_unsigned_t
#include "src/__support/big_int.h" // make_integral_or_big_int_unsigned_t
#include "src/__support/common.h"

namespace LIBC_NAMESPACE {
Expand Down
2 changes: 1 addition & 1 deletion libc/src/__support/str_to_float.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/FPUtil/dyadic_float.h"
#include "src/__support/FPUtil/rounding_mode.h"
#include "src/__support/UInt128.h"
#include "src/__support/common.h"
#include "src/__support/ctype_utils.h"
#include "src/__support/detailed_powers_of_ten.h"
#include "src/__support/high_precision_decimal.h"
#include "src/__support/str_to_integer.h"
#include "src/__support/str_to_num_result.h"
#include "src/__support/uint128.h"
#include "src/errno/libc_errno.h" // For ERANGE

namespace LIBC_NAMESPACE {
Expand Down
2 changes: 1 addition & 1 deletion libc/src/__support/str_to_integer.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

#include "src/__support/CPP/limits.h"
#include "src/__support/CPP/type_traits.h"
#include "src/__support/UInt128.h"
#include "src/__support/common.h"
#include "src/__support/ctype_utils.h"
#include "src/__support/str_to_num_result.h"
#include "src/__support/uint128.h"
#include "src/errno/libc_errno.h" // For ERANGE

namespace LIBC_NAMESPACE {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_UINT128_H
#define LLVM_LIBC_SRC___SUPPORT_UINT128_H

#include "UInt.h"
#include "big_int.h"
#include "src/__support/macros/properties/types.h" // LIBC_TYPES_HAS_INT128

#ifdef LIBC_TYPES_HAS_INT128
Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/generic/log_range_reduction.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include "common_constants.h"
#include "src/__support/FPUtil/dyadic_float.h"
#include "src/__support/UInt128.h"
#include "src/__support/uint128.h"

namespace LIBC_NAMESPACE {

Expand Down
12 changes: 6 additions & 6 deletions libc/src/stdio/printf_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,21 @@ add_object_library(
float_dec_converter.h
fixed_converter.h #TODO: Check if this should be disabled when fixed unavail
DEPENDS
.writer
.core_structs
.printf_config
.writer
libc.src.__support.big_int
libc.src.__support.common
libc.src.__support.CPP.limits
libc.src.__support.CPP.span
libc.src.__support.CPP.string_view
libc.src.__support.FPUtil.fp_bits
libc.src.__support.float_to_string
libc.src.__support.FPUtil.fenv_impl
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.rounding_mode
libc.src.__support.common
libc.src.__support.integer_to_string
libc.src.__support.libc_assert
libc.src.__support.uint
libc.src.__support.uint128
libc.src.__support.integer_to_string
libc.src.__support.float_to_string
)


Expand Down
2 changes: 1 addition & 1 deletion libc/src/stdio/printf_core/float_dec_converter.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "src/__support/CPP/string_view.h"
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/FPUtil/rounding_mode.h"
#include "src/__support/UInt.h" // is_big_int_v
#include "src/__support/big_int.h" // is_big_int_v
#include "src/__support/float_to_string.h"
#include "src/__support/integer_to_string.h"
#include "src/__support/libc_assert.h"
Expand Down
4 changes: 2 additions & 2 deletions libc/test/UnitTest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ add_unittest_framework_library(
Test.h
TestLogger.h
DEPENDS
libc.src.__support.big_int
libc.src.__support.c_string
libc.src.__support.CPP.string
libc.src.__support.CPP.string_view
libc.src.__support.CPP.type_traits
libc.src.__support.fixed_point.fx_rep
libc.src.__support.macros.properties.types
libc.src.__support.OSUtil.osutil
libc.src.__support.uint
libc.src.__support.uint128
)

Expand Down Expand Up @@ -103,9 +103,9 @@ add_header_library(
HDRS
StringUtils.h
DEPENDS
libc.src.__support.big_int
libc.src.__support.CPP.string
libc.src.__support.CPP.type_traits
libc.src.__support.uint
)

add_unittest_framework_library(
Expand Down
2 changes: 1 addition & 1 deletion libc/test/UnitTest/LibcTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
#include "include/llvm-libc-macros/stdfix-macros.h"
#include "src/__support/CPP/string.h"
#include "src/__support/CPP/string_view.h"
#include "src/__support/UInt128.h"
#include "src/__support/fixed_point/fx_rep.h"
#include "src/__support/macros/properties/types.h" // LIBC_TYPES_HAS_INT128
#include "src/__support/uint128.h"
#include "test/UnitTest/TestLogger.h"

#if __STDC_HOSTED__
Expand Down
2 changes: 1 addition & 1 deletion libc/test/UnitTest/StringUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include "src/__support/CPP/string.h"
#include "src/__support/CPP/type_traits.h"
#include "src/__support/UInt.h"
#include "src/__support/big_int.h"

namespace LIBC_NAMESPACE {

Expand Down
6 changes: 3 additions & 3 deletions libc/test/UnitTest/TestLogger.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include "test/UnitTest/TestLogger.h"
#include "src/__support/CPP/string.h"
#include "src/__support/CPP/string_view.h"
#include "src/__support/OSUtil/io.h" // write_to_stderr
#include "src/__support/UInt.h" // is_big_int
#include "src/__support/UInt128.h"
#include "src/__support/OSUtil/io.h" // write_to_stderr
#include "src/__support/big_int.h" // is_big_int
#include "src/__support/macros/properties/types.h" // LIBC_TYPES_HAS_INT128
#include "src/__support/uint128.h"

#include <stdint.h>

Expand Down
4 changes: 2 additions & 2 deletions libc/test/src/__support/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ add_libc_test(
SRCS
integer_to_string_test.cpp
DEPENDS
libc.src.__support.big_int
libc.src.__support.CPP.limits
libc.src.__support.CPP.string_view
libc.src.__support.integer_literals
libc.src.__support.integer_to_string
libc.src.__support.uint
libc.src.__support.uint128
)

Expand All @@ -107,9 +107,9 @@ if(NOT LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
SRCS
uint_test.cpp
DEPENDS
libc.src.__support.big_int
libc.src.__support.CPP.optional
libc.src.__support.macros.properties.types
libc.src.__support.uint
)
endif()

Expand Down
4 changes: 2 additions & 2 deletions libc/test/src/__support/CPP/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ add_libc_test(
SRCS
bit_test.cpp
DEPENDS
libc.src.__support.big_int
libc.src.__support.CPP.bit
libc.src.__support.macros.properties.types
libc.src.__support.uint
)

add_libc_test(
Expand Down Expand Up @@ -59,9 +59,9 @@ add_libc_test(
SRCS
limits_test.cpp
DEPENDS
libc.src.__support.big_int
libc.src.__support.CPP.limits
libc.src.__support.macros.properties.types
libc.src.__support.uint
)

add_libc_test(
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/__support/CPP/bit_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

#include "src/__support/CPP/bit.h"
#include "src/__support/UInt.h"
#include "src/__support/big_int.h"
#include "src/__support/macros/properties/types.h" // LIBC_TYPES_HAS_INT128
#include "test/UnitTest/Test.h"

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/__support/CPP/limits_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

#include "src/__support/CPP/limits.h"
#include "src/__support/UInt.h"
#include "src/__support/big_int.h"
#include "src/__support/macros/properties/types.h" // LIBC_TYPES_HAS_INT128
#include "test/UnitTest/Test.h"

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/__support/FPUtil/dyadic_float_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

#include "src/__support/FPUtil/dyadic_float.h"
#include "src/__support/UInt.h"
#include "src/__support/big_int.h"
#include "test/UnitTest/FPMatcher.h"
#include "test/UnitTest/Test.h"
#include "utils/MPFRWrapper/MPFRUtils.h"
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/__support/high_precision_decimal_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//

#include "src/__support/UInt128.h"
#include "src/__support/high_precision_decimal.h"
#include "src/__support/uint128.h"

#include "test/UnitTest/Test.h"

Expand Down
Loading