[libc-commits] [libc] 76ec69a - [libc] Remove the redundant header FPUtil/FEnvUtils.h
Tue Ly via libc-commits
libc-commits at lists.llvm.org
Fri Mar 4 11:10:10 PST 2022
Author: Tue Ly
Date: 2022-03-04T14:09:47-05:00
New Revision: 76ec69a911c696feb9d315fa8335406556718e89
URL: https://github.com/llvm/llvm-project/commit/76ec69a911c696feb9d315fa8335406556718e89
DIFF: https://github.com/llvm/llvm-project/commit/76ec69a911c696feb9d315fa8335406556718e89.diff
LOG: [libc] Remove the redundant header FPUtil/FEnvUtils.h
Remove the redundant header FPUtil/FEnvUtils.h, use FPUtil/FEnvImpl.h header instead.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D120965
Added:
Modified:
libc/src/__support/FPUtil/CMakeLists.txt
libc/src/__support/FPUtil/FEnvImpl.h
libc/src/__support/FPUtil/NearestIntegerOperations.h
libc/src/fenv/feclearexcept.cpp
libc/src/fenv/fedisableexcept.cpp
libc/src/fenv/feenableexcept.cpp
libc/src/fenv/fegetenv.cpp
libc/src/fenv/fegetexcept.cpp
libc/src/fenv/fegetexceptflag.cpp
libc/src/fenv/fegetround.cpp
libc/src/fenv/feholdexcept.cpp
libc/src/fenv/feraiseexcept.cpp
libc/src/fenv/fesetenv.cpp
libc/src/fenv/fesetexceptflag.cpp
libc/src/fenv/fesetround.cpp
libc/src/fenv/fetestexcept.cpp
libc/src/fenv/feupdateenv.cpp
libc/src/math/generic/log10f.cpp
libc/src/math/generic/log1pf.cpp
libc/src/math/generic/log2f.cpp
libc/test/src/fenv/enabled_exceptions_test.cpp
libc/test/src/fenv/exception_flags_test.cpp
libc/test/src/fenv/exception_status_test.cpp
libc/test/src/fenv/feclearexcept_test.cpp
libc/test/src/fenv/feholdexcept_test.cpp
libc/test/src/fenv/feupdateenv_test.cpp
libc/test/src/fenv/getenv_and_setenv_test.cpp
libc/test/src/math/RIntTest.h
libc/test/src/math/RoundToIntegerTest.h
Removed:
libc/src/__support/FPUtil/FEnvUtils.h
################################################################################
diff --git a/libc/src/__support/FPUtil/CMakeLists.txt b/libc/src/__support/FPUtil/CMakeLists.txt
index 555a3f4eb224b..a7acf3da70469 100644
--- a/libc/src/__support/FPUtil/CMakeLists.txt
+++ b/libc/src/__support/FPUtil/CMakeLists.txt
@@ -4,7 +4,6 @@ add_header_library(
FEnvImpl.h
BasicOperations.h
DivisionAndRemainderOperations.h
- FEnvUtils.h
FloatProperties.h
FPBits.h
BasicOperations.h
diff --git a/libc/src/__support/FPUtil/FEnvImpl.h b/libc/src/__support/FPUtil/FEnvImpl.h
index 8330f792e7e86..559da5281ae42 100644
--- a/libc/src/__support/FPUtil/FEnvImpl.h
+++ b/libc/src/__support/FPUtil/FEnvImpl.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_SUPPORT_FPUTIL_DUMMY_FENVIMPL_H
-#define LLVM_LIBC_SRC_SUPPORT_FPUTIL_DUMMY_FENVIMPL_H
+#ifndef LLVM_LIBC_SRC_SUPPORT_FPUTIL_FENVIMPL_H
+#define LLVM_LIBC_SRC_SUPPORT_FPUTIL_FENVIMPL_H
#include "src/__support/architectures.h"
@@ -44,4 +44,4 @@ static inline int set_env(const fenv_t *) { return 0; }
} // namespace __llvm_libc
#endif
-#endif // LLVM_LIBC_SRC_SUPPORT_FPUTIL_DUMMY_FENVIMPL_H
+#endif // LLVM_LIBC_SRC_SUPPORT_FPUTIL_FENVIMPL_H
diff --git a/libc/src/__support/FPUtil/FEnvUtils.h b/libc/src/__support/FPUtil/FEnvUtils.h
deleted file mode 100644
index 2cb62e558c80f..0000000000000
--- a/libc/src/__support/FPUtil/FEnvUtils.h
+++ /dev/null
@@ -1,22 +0,0 @@
-//===-- Utilities for manipulating floating point environment ---*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIBC_SRC_SUPPORT_FPUTIL_FENVUTILS_H
-#define LLVM_LIBC_SRC_SUPPORT_FPUTIL_FENVUTILS_H
-
-#include "src/__support/architectures.h"
-
-#if defined(LLVM_LIBC_ARCH_X86_64)
-#include "x86_64/FEnvImpl.h"
-#elif defined(LLVM_LIBC_ARCH_AARCH64)
-#include "aarch64/FEnvImpl.h"
-#else
-#include "DummyFEnvImpl.h"
-#endif
-
-#endif // LLVM_LIBC_SRC_SUPPORT_FPUTIL_FENVUTILS_H
diff --git a/libc/src/__support/FPUtil/NearestIntegerOperations.h b/libc/src/__support/FPUtil/NearestIntegerOperations.h
index eb4e290218365..bea5f5ad6387a 100644
--- a/libc/src/__support/FPUtil/NearestIntegerOperations.h
+++ b/libc/src/__support/FPUtil/NearestIntegerOperations.h
@@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC_SUPPORT_FPUTIL_NEAREST_INTEGER_OPERATIONS_H
#define LLVM_LIBC_SRC_SUPPORT_FPUTIL_NEAREST_INTEGER_OPERATIONS_H
-#include "FEnvUtils.h"
+#include "FEnvImpl.h"
#include "FPBits.h"
#include "src/__support/CPP/TypeTraits.h"
diff --git a/libc/src/fenv/feclearexcept.cpp b/libc/src/fenv/feclearexcept.cpp
index 3c24c63446bcd..2bdea887e1df6 100644
--- a/libc/src/fenv/feclearexcept.cpp
+++ b/libc/src/fenv/feclearexcept.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "src/fenv/feclearexcept.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/common.h"
namespace __llvm_libc {
diff --git a/libc/src/fenv/fedisableexcept.cpp b/libc/src/fenv/fedisableexcept.cpp
index b7b7d27516d6d..855d7077f7d99 100644
--- a/libc/src/fenv/fedisableexcept.cpp
+++ b/libc/src/fenv/fedisableexcept.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "src/fenv/fedisableexcept.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/common.h"
namespace __llvm_libc {
diff --git a/libc/src/fenv/feenableexcept.cpp b/libc/src/fenv/feenableexcept.cpp
index 9797d66c034cb..0b63a7fc5d123 100644
--- a/libc/src/fenv/feenableexcept.cpp
+++ b/libc/src/fenv/feenableexcept.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "src/fenv/feenableexcept.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/common.h"
namespace __llvm_libc {
diff --git a/libc/src/fenv/fegetenv.cpp b/libc/src/fenv/fegetenv.cpp
index 9ae7782dbd70e..cc98031b1252e 100644
--- a/libc/src/fenv/fegetenv.cpp
+++ b/libc/src/fenv/fegetenv.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "src/fenv/fegetenv.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/common.h"
namespace __llvm_libc {
diff --git a/libc/src/fenv/fegetexcept.cpp b/libc/src/fenv/fegetexcept.cpp
index 0a472c85a5c06..7cf1294fc6dfe 100644
--- a/libc/src/fenv/fegetexcept.cpp
+++ b/libc/src/fenv/fegetexcept.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "src/fenv/fegetexcept.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/common.h"
namespace __llvm_libc {
diff --git a/libc/src/fenv/fegetexceptflag.cpp b/libc/src/fenv/fegetexceptflag.cpp
index dfe2a6396e4f7..15c2468a1eb26 100644
--- a/libc/src/fenv/fegetexceptflag.cpp
+++ b/libc/src/fenv/fegetexceptflag.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "src/fenv/fegetexceptflag.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/common.h"
#include <fenv.h>
diff --git a/libc/src/fenv/fegetround.cpp b/libc/src/fenv/fegetround.cpp
index 3369037c1e5af..c01ea2c0ec417 100644
--- a/libc/src/fenv/fegetround.cpp
+++ b/libc/src/fenv/fegetround.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "src/fenv/fegetround.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/common.h"
namespace __llvm_libc {
diff --git a/libc/src/fenv/feholdexcept.cpp b/libc/src/fenv/feholdexcept.cpp
index 3e31e817c60d5..fe0f10245b875 100644
--- a/libc/src/fenv/feholdexcept.cpp
+++ b/libc/src/fenv/feholdexcept.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "src/fenv/feholdexcept.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/common.h"
#include <fenv.h>
diff --git a/libc/src/fenv/feraiseexcept.cpp b/libc/src/fenv/feraiseexcept.cpp
index a14ac864926e2..4c2a467ccf653 100644
--- a/libc/src/fenv/feraiseexcept.cpp
+++ b/libc/src/fenv/feraiseexcept.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "src/fenv/feraiseexcept.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/common.h"
namespace __llvm_libc {
diff --git a/libc/src/fenv/fesetenv.cpp b/libc/src/fenv/fesetenv.cpp
index 2b10e0b96bb69..628da315feda3 100644
--- a/libc/src/fenv/fesetenv.cpp
+++ b/libc/src/fenv/fesetenv.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "src/fenv/fesetenv.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/common.h"
namespace __llvm_libc {
diff --git a/libc/src/fenv/fesetexceptflag.cpp b/libc/src/fenv/fesetexceptflag.cpp
index 93f22a4be1cba..7ee9b1c63a309 100644
--- a/libc/src/fenv/fesetexceptflag.cpp
+++ b/libc/src/fenv/fesetexceptflag.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "src/fenv/fesetexceptflag.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/common.h"
#include <fenv.h>
diff --git a/libc/src/fenv/fesetround.cpp b/libc/src/fenv/fesetround.cpp
index a118e2ffa7e4c..4af8a77e6e9e4 100644
--- a/libc/src/fenv/fesetround.cpp
+++ b/libc/src/fenv/fesetround.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "src/fenv/fesetround.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/common.h"
namespace __llvm_libc {
diff --git a/libc/src/fenv/fetestexcept.cpp b/libc/src/fenv/fetestexcept.cpp
index 52455ed334786..c70301fd248e2 100644
--- a/libc/src/fenv/fetestexcept.cpp
+++ b/libc/src/fenv/fetestexcept.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "src/fenv/fetestexcept.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/common.h"
namespace __llvm_libc {
diff --git a/libc/src/fenv/feupdateenv.cpp b/libc/src/fenv/feupdateenv.cpp
index 1606dd2233005..5cecf0fae19e8 100644
--- a/libc/src/fenv/feupdateenv.cpp
+++ b/libc/src/fenv/feupdateenv.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "src/fenv/feupdateenv.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/common.h"
#include <fenv.h>
diff --git a/libc/src/math/generic/log10f.cpp b/libc/src/math/generic/log10f.cpp
index b7509b3fb2a60..59ca6590b640a 100644
--- a/libc/src/math/generic/log10f.cpp
+++ b/libc/src/math/generic/log10f.cpp
@@ -9,7 +9,7 @@
#include "src/math/log10f.h"
#include "common_constants.h" // Lookup table for (1/f)
#include "src/__support/FPUtil/BasicOperations.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/FPUtil/FMA.h"
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/FPUtil/PolyEval.h"
diff --git a/libc/src/math/generic/log1pf.cpp b/libc/src/math/generic/log1pf.cpp
index a4d615c9dd22f..7d1e71e919902 100644
--- a/libc/src/math/generic/log1pf.cpp
+++ b/libc/src/math/generic/log1pf.cpp
@@ -9,7 +9,7 @@
#include "src/math/log1pf.h"
#include "common_constants.h" // Lookup table for (1/f) and log(f)
#include "src/__support/FPUtil/BasicOperations.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/FPUtil/FMA.h"
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/FPUtil/PolyEval.h"
diff --git a/libc/src/math/generic/log2f.cpp b/libc/src/math/generic/log2f.cpp
index 3957db54f72dd..6912cfc3440b8 100644
--- a/libc/src/math/generic/log2f.cpp
+++ b/libc/src/math/generic/log2f.cpp
@@ -9,7 +9,7 @@
#include "src/math/log2f.h"
#include "common_constants.h" // Lookup table for (1/f)
#include "src/__support/FPUtil/BasicOperations.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/FPUtil/FMA.h"
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/FPUtil/PolyEval.h"
diff --git a/libc/test/src/fenv/enabled_exceptions_test.cpp b/libc/test/src/fenv/enabled_exceptions_test.cpp
index 75463c34898ab..75e3cdaa9da9c 100644
--- a/libc/test/src/fenv/enabled_exceptions_test.cpp
+++ b/libc/test/src/fenv/enabled_exceptions_test.cpp
@@ -10,7 +10,7 @@
#include "src/fenv/feraiseexcept.h"
#include "src/fenv/fetestexcept.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/architectures.h"
#include "utils/UnitTest/FPExceptMatcher.h"
#include "utils/UnitTest/Test.h"
diff --git a/libc/test/src/fenv/exception_flags_test.cpp b/libc/test/src/fenv/exception_flags_test.cpp
index bb2220c390b18..1e8486ff9bde4 100644
--- a/libc/test/src/fenv/exception_flags_test.cpp
+++ b/libc/test/src/fenv/exception_flags_test.cpp
@@ -9,7 +9,7 @@
#include "src/fenv/fegetexceptflag.h"
#include "src/fenv/fesetexceptflag.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "utils/UnitTest/Test.h"
#include <fenv.h>
diff --git a/libc/test/src/fenv/exception_status_test.cpp b/libc/test/src/fenv/exception_status_test.cpp
index f897e65439f2a..53043ec48e064 100644
--- a/libc/test/src/fenv/exception_status_test.cpp
+++ b/libc/test/src/fenv/exception_status_test.cpp
@@ -10,7 +10,7 @@
#include "src/fenv/feraiseexcept.h"
#include "src/fenv/fetestexcept.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "utils/UnitTest/Test.h"
#include <fenv.h>
diff --git a/libc/test/src/fenv/feclearexcept_test.cpp b/libc/test/src/fenv/feclearexcept_test.cpp
index e1cd406bd68f9..f102d5735ad7c 100644
--- a/libc/test/src/fenv/feclearexcept_test.cpp
+++ b/libc/test/src/fenv/feclearexcept_test.cpp
@@ -8,7 +8,7 @@
#include "src/fenv/feclearexcept.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "utils/UnitTest/Test.h"
#include <fenv.h>
diff --git a/libc/test/src/fenv/feholdexcept_test.cpp b/libc/test/src/fenv/feholdexcept_test.cpp
index 246650b37bfa1..99df0bb6dacf7 100644
--- a/libc/test/src/fenv/feholdexcept_test.cpp
+++ b/libc/test/src/fenv/feholdexcept_test.cpp
@@ -8,7 +8,7 @@
#include "src/fenv/feholdexcept.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/architectures.h"
#include "utils/UnitTest/FPExceptMatcher.h"
#include "utils/UnitTest/Test.h"
diff --git a/libc/test/src/fenv/feupdateenv_test.cpp b/libc/test/src/fenv/feupdateenv_test.cpp
index b6eec583ecfb7..9806bb36b3728 100644
--- a/libc/test/src/fenv/feupdateenv_test.cpp
+++ b/libc/test/src/fenv/feupdateenv_test.cpp
@@ -8,7 +8,7 @@
#include "src/fenv/feupdateenv.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "utils/UnitTest/Test.h"
#include <fenv.h>
diff --git a/libc/test/src/fenv/getenv_and_setenv_test.cpp b/libc/test/src/fenv/getenv_and_setenv_test.cpp
index 95cef71c52a8d..583753c813d68 100644
--- a/libc/test/src/fenv/getenv_and_setenv_test.cpp
+++ b/libc/test/src/fenv/getenv_and_setenv_test.cpp
@@ -11,7 +11,7 @@
#include "src/fenv/fesetenv.h"
#include "src/fenv/fesetround.h"
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "utils/UnitTest/Test.h"
#include <fenv.h>
diff --git a/libc/test/src/math/RIntTest.h b/libc/test/src/math/RIntTest.h
index 438a92338dfa2..90945feb67896 100644
--- a/libc/test/src/math/RIntTest.h
+++ b/libc/test/src/math/RIntTest.h
@@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_TEST_SRC_MATH_RINTTEST_H
#define LLVM_LIBC_TEST_SRC_MATH_RINTTEST_H
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/FPUtil/FPBits.h"
#include "utils/MPFRWrapper/MPFRUtils.h"
#include "utils/UnitTest/FPMatcher.h"
diff --git a/libc/test/src/math/RoundToIntegerTest.h b/libc/test/src/math/RoundToIntegerTest.h
index 60647eaadc6b0..e5056474d1079 100644
--- a/libc/test/src/math/RoundToIntegerTest.h
+++ b/libc/test/src/math/RoundToIntegerTest.h
@@ -18,7 +18,7 @@
#include <errno.h>
#endif
#if math_errhandling & MATH_ERREXCEPT
-#include "src/__support/FPUtil/FEnvUtils.h"
+#include "src/__support/FPUtil/FEnvImpl.h"
#endif
namespace mpfr = __llvm_libc::testing::mpfr;
More information about the libc-commits
mailing list