From cee1e7d14f4628d6174b33640d502bff3b54ae45 Mon Sep 17 00:00:00 2001 From: Siva Chandra Reddy Date: Tue, 15 Dec 2020 21:40:40 -0800 Subject: [PATCH] [libc][NFC][Obvious] Remove few unnecessary #include directives in tests. --- libc/test/src/math/HypotTest.h | 3 ++- libc/test/src/math/RoundToIntegerTest.h | 1 - libc/test/src/math/hypot_test.cpp | 1 - libc/test/src/math/hypotf_test.cpp | 1 - libc/test/src/math/ldexp_test.cpp | 8 -------- libc/test/src/math/ldexpf_test.cpp | 8 -------- libc/test/src/math/ldexpl_test.cpp | 8 -------- libc/test/src/math/llround_test.cpp | 1 - libc/test/src/math/llroundf_test.cpp | 1 - libc/test/src/math/llroundl_test.cpp | 1 - libc/test/src/math/lround_test.cpp | 1 - libc/test/src/math/lroundf_test.cpp | 1 - libc/test/src/math/lroundl_test.cpp | 1 - libc/test/utils/FPUtil/x86_long_double_test.cpp | 3 ++- libc/utils/FPUtil/ManipulationFunctions.h | 2 +- 15 files changed, 5 insertions(+), 36 deletions(-) diff --git a/libc/test/src/math/HypotTest.h b/libc/test/src/math/HypotTest.h index f90807b..34b1ff6 100644 --- a/libc/test/src/math/HypotTest.h +++ b/libc/test/src/math/HypotTest.h @@ -9,13 +9,14 @@ #ifndef LLVM_LIBC_TEST_SRC_MATH_HYPOTTEST_H #define LLVM_LIBC_TEST_SRC_MATH_HYPOTTEST_H -#include "include/math.h" #include "utils/FPUtil/FPBits.h" #include "utils/FPUtil/Hypot.h" #include "utils/FPUtil/TestHelpers.h" #include "utils/MPFRWrapper/MPFRUtils.h" #include "utils/UnitTest/Test.h" +#include + namespace mpfr = __llvm_libc::testing::mpfr; template diff --git a/libc/test/src/math/RoundToIntegerTest.h b/libc/test/src/math/RoundToIntegerTest.h index 7c0605e..37b42f3 100644 --- a/libc/test/src/math/RoundToIntegerTest.h +++ b/libc/test/src/math/RoundToIntegerTest.h @@ -13,7 +13,6 @@ #include "src/fenv/feclearexcept.h" #include "src/fenv/feraiseexcept.h" #include "src/fenv/fetestexcept.h" -#include "utils/CPP/TypeTraits.h" #include "utils/FPUtil/FPBits.h" #include "utils/MPFRWrapper/MPFRUtils.h" #include "utils/UnitTest/Test.h" diff --git a/libc/test/src/math/hypot_test.cpp b/libc/test/src/math/hypot_test.cpp index d723f52..0607dbd 100644 --- a/libc/test/src/math/hypot_test.cpp +++ b/libc/test/src/math/hypot_test.cpp @@ -8,7 +8,6 @@ #include "HypotTest.h" -#include "include/math.h" #include "src/math/hypot.h" using HypotTest = HypotTestTemplate; diff --git a/libc/test/src/math/hypotf_test.cpp b/libc/test/src/math/hypotf_test.cpp index 21d1bea..864e566 100644 --- a/libc/test/src/math/hypotf_test.cpp +++ b/libc/test/src/math/hypotf_test.cpp @@ -8,7 +8,6 @@ #include "HypotTest.h" -#include "include/math.h" #include "src/math/hypotf.h" using HypotfTest = HypotTestTemplate; diff --git a/libc/test/src/math/ldexp_test.cpp b/libc/test/src/math/ldexp_test.cpp index 0f5974c..c078aa4 100644 --- a/libc/test/src/math/ldexp_test.cpp +++ b/libc/test/src/math/ldexp_test.cpp @@ -8,14 +8,6 @@ #include "LdExpTest.h" -#include "include/math.h" #include "src/math/ldexp.h" -#include "utils/CPP/Functional.h" -#include "utils/FPUtil/FPBits.h" -#include "utils/FPUtil/ManipulationFunctions.h" -#include "utils/FPUtil/TestHelpers.h" -#include "utils/UnitTest/Test.h" - -#include LIST_LDEXP_TESTS(double, __llvm_libc::ldexp) diff --git a/libc/test/src/math/ldexpf_test.cpp b/libc/test/src/math/ldexpf_test.cpp index d9a44b3..4fe80fc 100644 --- a/libc/test/src/math/ldexpf_test.cpp +++ b/libc/test/src/math/ldexpf_test.cpp @@ -8,14 +8,6 @@ #include "LdExpTest.h" -#include "include/math.h" #include "src/math/ldexpf.h" -#include "utils/CPP/Functional.h" -#include "utils/FPUtil/FPBits.h" -#include "utils/FPUtil/ManipulationFunctions.h" -#include "utils/FPUtil/TestHelpers.h" -#include "utils/UnitTest/Test.h" - -#include LIST_LDEXP_TESTS(float, __llvm_libc::ldexpf) diff --git a/libc/test/src/math/ldexpl_test.cpp b/libc/test/src/math/ldexpl_test.cpp index 69444b6..5e6e6e7 100644 --- a/libc/test/src/math/ldexpl_test.cpp +++ b/libc/test/src/math/ldexpl_test.cpp @@ -8,14 +8,6 @@ #include "LdExpTest.h" -#include "include/math.h" #include "src/math/ldexpl.h" -#include "utils/CPP/Functional.h" -#include "utils/FPUtil/FPBits.h" -#include "utils/FPUtil/ManipulationFunctions.h" -#include "utils/FPUtil/TestHelpers.h" -#include "utils/UnitTest/Test.h" - -#include LIST_LDEXP_TESTS(long double, __llvm_libc::ldexpl) diff --git a/libc/test/src/math/llround_test.cpp b/libc/test/src/math/llround_test.cpp index e7d5b90..c86095d 100644 --- a/libc/test/src/math/llround_test.cpp +++ b/libc/test/src/math/llround_test.cpp @@ -8,7 +8,6 @@ #include "RoundToIntegerTest.h" -#include "include/math.h" #include "src/math/llround.h" LIST_ROUND_TO_INTEGER_TESTS(double, long long, __llvm_libc::llround) diff --git a/libc/test/src/math/llroundf_test.cpp b/libc/test/src/math/llroundf_test.cpp index 35644a7..5e36258 100644 --- a/libc/test/src/math/llroundf_test.cpp +++ b/libc/test/src/math/llroundf_test.cpp @@ -8,7 +8,6 @@ #include "RoundToIntegerTest.h" -#include "include/math.h" #include "src/math/llroundf.h" LIST_ROUND_TO_INTEGER_TESTS(float, long long, __llvm_libc::llroundf) diff --git a/libc/test/src/math/llroundl_test.cpp b/libc/test/src/math/llroundl_test.cpp index 9f19c35..8fbc840 100644 --- a/libc/test/src/math/llroundl_test.cpp +++ b/libc/test/src/math/llroundl_test.cpp @@ -8,7 +8,6 @@ #include "RoundToIntegerTest.h" -#include "include/math.h" #include "src/math/llroundl.h" LIST_ROUND_TO_INTEGER_TESTS(long double, long long, __llvm_libc::llroundl) diff --git a/libc/test/src/math/lround_test.cpp b/libc/test/src/math/lround_test.cpp index 96634f8..0ee580f 100644 --- a/libc/test/src/math/lround_test.cpp +++ b/libc/test/src/math/lround_test.cpp @@ -8,7 +8,6 @@ #include "RoundToIntegerTest.h" -#include "include/math.h" #include "src/math/lround.h" LIST_ROUND_TO_INTEGER_TESTS(double, long, __llvm_libc::lround) diff --git a/libc/test/src/math/lroundf_test.cpp b/libc/test/src/math/lroundf_test.cpp index 9df4273..7a2aad2 100644 --- a/libc/test/src/math/lroundf_test.cpp +++ b/libc/test/src/math/lroundf_test.cpp @@ -8,7 +8,6 @@ #include "RoundToIntegerTest.h" -#include "include/math.h" #include "src/math/lroundf.h" LIST_ROUND_TO_INTEGER_TESTS(float, long, __llvm_libc::lroundf) diff --git a/libc/test/src/math/lroundl_test.cpp b/libc/test/src/math/lroundl_test.cpp index 27429a8..c0ea339 100644 --- a/libc/test/src/math/lroundl_test.cpp +++ b/libc/test/src/math/lroundl_test.cpp @@ -8,7 +8,6 @@ #include "RoundToIntegerTest.h" -#include "include/math.h" #include "src/math/lroundl.h" LIST_ROUND_TO_INTEGER_TESTS(long double, long, __llvm_libc::lroundl) diff --git a/libc/test/utils/FPUtil/x86_long_double_test.cpp b/libc/test/utils/FPUtil/x86_long_double_test.cpp index d4fb870..ff64464 100644 --- a/libc/test/utils/FPUtil/x86_long_double_test.cpp +++ b/libc/test/utils/FPUtil/x86_long_double_test.cpp @@ -6,10 +6,11 @@ // //===----------------------------------------------------------------------===// -#include "include/math.h" #include "utils/FPUtil/FPBits.h" #include "utils/UnitTest/Test.h" +#include + using FPBits = __llvm_libc::fputil::FPBits; TEST(X86LongDoubleTest, isNaN) { diff --git a/libc/utils/FPUtil/ManipulationFunctions.h b/libc/utils/FPUtil/ManipulationFunctions.h index 2bac1b5..79dc741 100644 --- a/libc/utils/FPUtil/ManipulationFunctions.h +++ b/libc/utils/FPUtil/ManipulationFunctions.h @@ -13,10 +13,10 @@ #include "NearestIntegerOperations.h" #include "NormalFloat.h" -#include "include/math.h" #include "utils/CPP/TypeTraits.h" #include +#include namespace __llvm_libc { namespace fputil { -- 2.7.4