[llvm-branch-commits] [libc] cee1e7d - [libc][NFC][Obvious] Remove few unnecessary #include directives in tests.

Siva Chandra Reddy via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Dec 15 22:01:13 PST 2020


Author: Siva Chandra Reddy
Date: 2020-12-15T21:41:44-08:00
New Revision: cee1e7d14f4628d6174b33640d502bff3b54ae45

URL: https://github.com/llvm/llvm-project/commit/cee1e7d14f4628d6174b33640d502bff3b54ae45
DIFF: https://github.com/llvm/llvm-project/commit/cee1e7d14f4628d6174b33640d502bff3b54ae45.diff

LOG: [libc][NFC][Obvious] Remove few unnecessary #include directives in tests.

Added: 
    

Modified: 
    libc/test/src/math/HypotTest.h
    libc/test/src/math/RoundToIntegerTest.h
    libc/test/src/math/hypot_test.cpp
    libc/test/src/math/hypotf_test.cpp
    libc/test/src/math/ldexp_test.cpp
    libc/test/src/math/ldexpf_test.cpp
    libc/test/src/math/ldexpl_test.cpp
    libc/test/src/math/llround_test.cpp
    libc/test/src/math/llroundf_test.cpp
    libc/test/src/math/llroundl_test.cpp
    libc/test/src/math/lround_test.cpp
    libc/test/src/math/lroundf_test.cpp
    libc/test/src/math/lroundl_test.cpp
    libc/test/utils/FPUtil/x86_long_double_test.cpp
    libc/utils/FPUtil/ManipulationFunctions.h

Removed: 
    


################################################################################
diff  --git a/libc/test/src/math/HypotTest.h b/libc/test/src/math/HypotTest.h
index f90807b62c5f..34b1ff6a08b6 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 <math.h>
+
 namespace mpfr = __llvm_libc::testing::mpfr;
 
 template <typename T>

diff  --git a/libc/test/src/math/RoundToIntegerTest.h b/libc/test/src/math/RoundToIntegerTest.h
index 7c0605ebcadd..37b42f385247 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 d723f5264afc..0607dbdcb6eb 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<double>;

diff  --git a/libc/test/src/math/hypotf_test.cpp b/libc/test/src/math/hypotf_test.cpp
index 21d1bea03291..864e56602d27 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<float>;

diff  --git a/libc/test/src/math/ldexp_test.cpp b/libc/test/src/math/ldexp_test.cpp
index 0f5974c018f7..c078aa4b7ef8 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 <limits.h>
 
 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 d9a44b3f4125..4fe80fc79151 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 <limits.h>
 
 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 69444b6edbaf..5e6e6e75ae08 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 <limits.h>
 
 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 e7d5b9006621..c86095dc9aae 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 35644a7a6829..5e36258c246a 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 9f19c3516c32..8fbc840c4f2a 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 96634f84c1a8..0ee580f316b4 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 9df427386cb0..7a2aad20e4f6 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 27429a83ee7b..c0ea33978205 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 d4fb8707f2bf..ff644646e12f 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 <math.h>
+
 using FPBits = __llvm_libc::fputil::FPBits<long double>;
 
 TEST(X86LongDoubleTest, isNaN) {

diff  --git a/libc/utils/FPUtil/ManipulationFunctions.h b/libc/utils/FPUtil/ManipulationFunctions.h
index 2bac1b5c229f..79dc741ff629 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 <limits.h>
+#include <math.h>
 
 namespace __llvm_libc {
 namespace fputil {


        


More information about the llvm-branch-commits mailing list