From 049cfc464d1718c5cd97fa8a8ddf0fc36e101f98 Mon Sep 17 00:00:00 2001 From: Hedin Garca Date: Wed, 21 Jul 2021 18:12:29 +0000 Subject: [PATCH] [libc] Rename FEnv.h and refactor subsequent files Because Windows's pathnames are not case sensitive, to avoid include conflicts between our header file FEnv.h and the one from the C Standard library, , the prior file was renamed. The motive for the relabel came to fix this include error in TestHelpers.cpp since a conflict arose with a file in the same directory when #include was being used. Reviewed By: sivachandra, aeubanks Differential Revision: https://reviews.llvm.org/D106470 --- libc/src/fenv/feclearexcept.cpp | 2 +- libc/src/fenv/fegetenv.cpp | 2 +- libc/src/fenv/fegetexceptflag.cpp | 2 +- libc/src/fenv/fegetround.cpp | 2 +- libc/src/fenv/feholdexcept.cpp | 2 +- libc/src/fenv/feraiseexcept.cpp | 2 +- libc/src/fenv/fesetenv.cpp | 2 +- libc/src/fenv/fesetexceptflag.cpp | 2 +- libc/src/fenv/fesetround.cpp | 2 +- libc/src/fenv/fetestexcept.cpp | 2 +- libc/src/fenv/feupdateenv.cpp | 2 +- libc/test/src/fenv/enabled_exceptions_test.cpp | 2 +- libc/test/src/fenv/exception_flags_test.cpp | 2 +- libc/test/src/fenv/exception_status_test.cpp | 2 +- libc/test/src/fenv/feclearexcept_test.cpp | 2 +- libc/test/src/fenv/feholdexcept_test.cpp | 2 +- libc/test/src/fenv/feupdateenv_test.cpp | 2 +- libc/test/src/fenv/getenv_and_setenv_test.cpp | 2 +- libc/test/src/math/RIntTest.h | 2 +- libc/test/src/math/RoundToIntegerTest.h | 2 +- libc/utils/FPUtil/CMakeLists.txt | 6 +++--- libc/utils/FPUtil/{DummyFEnv.h => DummyFEnvImpl.h} | 6 +++--- libc/utils/FPUtil/{FEnv.h => FEnvUtils.h} | 12 ++++++------ libc/utils/FPUtil/NearestIntegerOperations.h | 2 +- libc/utils/FPUtil/aarch64/{FEnv.h => FEnvImpl.h} | 6 +++--- libc/utils/FPUtil/x86_64/{FEnv.h => FEnvImpl.h} | 6 +++--- 26 files changed, 39 insertions(+), 39 deletions(-) rename libc/utils/FPUtil/{DummyFEnv.h => DummyFEnvImpl.h} (86%) rename libc/utils/FPUtil/{FEnv.h => FEnvUtils.h} (66%) rename libc/utils/FPUtil/aarch64/{FEnv.h => FEnvImpl.h} (97%) rename libc/utils/FPUtil/x86_64/{FEnv.h => FEnvImpl.h} (98%) diff --git a/libc/src/fenv/feclearexcept.cpp b/libc/src/fenv/feclearexcept.cpp index b0aa763..8929723 100644 --- a/libc/src/fenv/feclearexcept.cpp +++ b/libc/src/fenv/feclearexcept.cpp @@ -8,7 +8,7 @@ #include "src/fenv/feclearexcept.h" #include "src/__support/common.h" -#include "utils/FPUtil/FEnv.h" +#include "utils/FPUtil/FEnvUtils.h" namespace __llvm_libc { diff --git a/libc/src/fenv/fegetenv.cpp b/libc/src/fenv/fegetenv.cpp index 28fef8a..0988499 100644 --- a/libc/src/fenv/fegetenv.cpp +++ b/libc/src/fenv/fegetenv.cpp @@ -8,7 +8,7 @@ #include "src/fenv/fegetenv.h" #include "src/__support/common.h" -#include "utils/FPUtil/FEnv.h" +#include "utils/FPUtil/FEnvUtils.h" namespace __llvm_libc { diff --git a/libc/src/fenv/fegetexceptflag.cpp b/libc/src/fenv/fegetexceptflag.cpp index 24620b0..be5c93e 100644 --- a/libc/src/fenv/fegetexceptflag.cpp +++ b/libc/src/fenv/fegetexceptflag.cpp @@ -8,7 +8,7 @@ #include "src/fenv/fegetexceptflag.h" #include "src/__support/common.h" -#include "utils/FPUtil/FEnv.h" +#include "utils/FPUtil/FEnvUtils.h" #include diff --git a/libc/src/fenv/fegetround.cpp b/libc/src/fenv/fegetround.cpp index 3e198f6..88c3b23 100644 --- a/libc/src/fenv/fegetround.cpp +++ b/libc/src/fenv/fegetround.cpp @@ -8,7 +8,7 @@ #include "src/fenv/fegetround.h" #include "src/__support/common.h" -#include "utils/FPUtil/FEnv.h" +#include "utils/FPUtil/FEnvUtils.h" namespace __llvm_libc { diff --git a/libc/src/fenv/feholdexcept.cpp b/libc/src/fenv/feholdexcept.cpp index 76a82d2..890db42 100644 --- a/libc/src/fenv/feholdexcept.cpp +++ b/libc/src/fenv/feholdexcept.cpp @@ -8,7 +8,7 @@ #include "src/fenv/feholdexcept.h" #include "src/__support/common.h" -#include "utils/FPUtil/FEnv.h" +#include "utils/FPUtil/FEnvUtils.h" #include diff --git a/libc/src/fenv/feraiseexcept.cpp b/libc/src/fenv/feraiseexcept.cpp index 77128ff..beb4099a 100644 --- a/libc/src/fenv/feraiseexcept.cpp +++ b/libc/src/fenv/feraiseexcept.cpp @@ -8,7 +8,7 @@ #include "src/fenv/feraiseexcept.h" #include "src/__support/common.h" -#include "utils/FPUtil/FEnv.h" +#include "utils/FPUtil/FEnvUtils.h" namespace __llvm_libc { diff --git a/libc/src/fenv/fesetenv.cpp b/libc/src/fenv/fesetenv.cpp index 5f6ede8..ec0b7cb 100644 --- a/libc/src/fenv/fesetenv.cpp +++ b/libc/src/fenv/fesetenv.cpp @@ -8,7 +8,7 @@ #include "src/fenv/fesetenv.h" #include "src/__support/common.h" -#include "utils/FPUtil/FEnv.h" +#include "utils/FPUtil/FEnvUtils.h" namespace __llvm_libc { diff --git a/libc/src/fenv/fesetexceptflag.cpp b/libc/src/fenv/fesetexceptflag.cpp index 9ee6205..851b13e 100644 --- a/libc/src/fenv/fesetexceptflag.cpp +++ b/libc/src/fenv/fesetexceptflag.cpp @@ -8,7 +8,7 @@ #include "src/fenv/fesetexceptflag.h" #include "src/__support/common.h" -#include "utils/FPUtil/FEnv.h" +#include "utils/FPUtil/FEnvUtils.h" #include diff --git a/libc/src/fenv/fesetround.cpp b/libc/src/fenv/fesetround.cpp index 5abd372..25b51e7 100644 --- a/libc/src/fenv/fesetround.cpp +++ b/libc/src/fenv/fesetround.cpp @@ -8,7 +8,7 @@ #include "src/fenv/fesetround.h" #include "src/__support/common.h" -#include "utils/FPUtil/FEnv.h" +#include "utils/FPUtil/FEnvUtils.h" namespace __llvm_libc { diff --git a/libc/src/fenv/fetestexcept.cpp b/libc/src/fenv/fetestexcept.cpp index 4f698dc..e33319c 100644 --- a/libc/src/fenv/fetestexcept.cpp +++ b/libc/src/fenv/fetestexcept.cpp @@ -8,7 +8,7 @@ #include "src/fenv/fetestexcept.h" #include "src/__support/common.h" -#include "utils/FPUtil/FEnv.h" +#include "utils/FPUtil/FEnvUtils.h" namespace __llvm_libc { diff --git a/libc/src/fenv/feupdateenv.cpp b/libc/src/fenv/feupdateenv.cpp index ff45991..f3f6e36 100644 --- a/libc/src/fenv/feupdateenv.cpp +++ b/libc/src/fenv/feupdateenv.cpp @@ -8,7 +8,7 @@ #include "src/fenv/feupdateenv.h" #include "src/__support/common.h" -#include "utils/FPUtil/FEnv.h" +#include "utils/FPUtil/FEnvUtils.h" #include diff --git a/libc/test/src/fenv/enabled_exceptions_test.cpp b/libc/test/src/fenv/enabled_exceptions_test.cpp index 980c2c0..52191e0 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 "utils/FPUtil/FEnv.h" +#include "utils/FPUtil/FEnvUtils.h" #include "utils/FPUtil/TestHelpers.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 855ba7c..e92447d5 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 "utils/FPUtil/FEnv.h" +#include "utils/FPUtil/FEnvUtils.h" #include "utils/UnitTest/Test.h" #include diff --git a/libc/test/src/fenv/exception_status_test.cpp b/libc/test/src/fenv/exception_status_test.cpp index 12a65bd..734d478 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 "utils/FPUtil/FEnv.h" +#include "utils/FPUtil/FEnvUtils.h" #include "utils/UnitTest/Test.h" #include diff --git a/libc/test/src/fenv/feclearexcept_test.cpp b/libc/test/src/fenv/feclearexcept_test.cpp index dfdc29d..304ecc0 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 "utils/FPUtil/FEnv.h" +#include "utils/FPUtil/FEnvUtils.h" #include "utils/UnitTest/Test.h" #include diff --git a/libc/test/src/fenv/feholdexcept_test.cpp b/libc/test/src/fenv/feholdexcept_test.cpp index 0b860a9..3cb305a 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 "utils/FPUtil/FEnv.h" +#include "utils/FPUtil/FEnvUtils.h" #include "utils/FPUtil/TestHelpers.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 da40ab1..d1953d8 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 "utils/FPUtil/FEnv.h" +#include "utils/FPUtil/FEnvUtils.h" #include "utils/UnitTest/Test.h" #include diff --git a/libc/test/src/fenv/getenv_and_setenv_test.cpp b/libc/test/src/fenv/getenv_and_setenv_test.cpp index ebd6d47..55e20c3 100644 --- a/libc/test/src/fenv/getenv_and_setenv_test.cpp +++ b/libc/test/src/fenv/getenv_and_setenv_test.cpp @@ -9,7 +9,7 @@ #include "src/fenv/fegetenv.h" #include "src/fenv/fesetenv.h" -#include "utils/FPUtil/FEnv.h" +#include "utils/FPUtil/FEnvUtils.h" #include "utils/UnitTest/Test.h" #include diff --git a/libc/test/src/math/RIntTest.h b/libc/test/src/math/RIntTest.h index edcc279..1f7200d 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 "utils/FPUtil/FEnv.h" +#include "utils/FPUtil/FEnvUtils.h" #include "utils/FPUtil/FPBits.h" #include "utils/FPUtil/TestHelpers.h" #include "utils/MPFRWrapper/MPFRUtils.h" diff --git a/libc/test/src/math/RoundToIntegerTest.h b/libc/test/src/math/RoundToIntegerTest.h index 2dcb2c9..a06fba8 100644 --- a/libc/test/src/math/RoundToIntegerTest.h +++ b/libc/test/src/math/RoundToIntegerTest.h @@ -18,7 +18,7 @@ #include #endif #if math_errhandling & MATH_ERREXCEPT -#include "utils/FPUtil/FEnv.h" +#include "utils/FPUtil/FEnvUtils.h" #endif namespace mpfr = __llvm_libc::testing::mpfr; diff --git a/libc/utils/FPUtil/CMakeLists.txt b/libc/utils/FPUtil/CMakeLists.txt index 7b6daff..49c594a 100644 --- a/libc/utils/FPUtil/CMakeLists.txt +++ b/libc/utils/FPUtil/CMakeLists.txt @@ -5,9 +5,9 @@ else() endif() if(EXISTS ${LIBC_TARGET_ARCHITECTURE}) - set(FENV_IMPL ${LIBC_TARGET_ARCHITECTURE}/FEnv.h) + set(FENV_IMPL ${LIBC_TARGET_ARCHITECTURE}/FEnvImpl.h) else() - set(FENV_IMPL DummyFEnv.h) + set(FENV_IMPL DummyFEnvImpl.h) endif() add_header_library( @@ -17,7 +17,7 @@ add_header_library( ${FENV_IMPL} BasicOperations.h DivisionAndRemainderOperations.h - FEnv.h + FEnvUtils.h FloatProperties.h FPBits.h BasicOperations.h diff --git a/libc/utils/FPUtil/DummyFEnv.h b/libc/utils/FPUtil/DummyFEnvImpl.h similarity index 86% rename from libc/utils/FPUtil/DummyFEnv.h rename to libc/utils/FPUtil/DummyFEnvImpl.h index 216749f..8e983dd 100644 --- a/libc/utils/FPUtil/DummyFEnv.h +++ b/libc/utils/FPUtil/DummyFEnvImpl.h @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_LIBC_UTILS_FPUTIL_DUMMY_FENV_H -#define LLVM_LIBC_UTILS_FPUTIL_DUMMY_FENV_H +#ifndef LLVM_LIBC_UTILS_FPUTIL_DUMMY_FENVIMPL_H +#define LLVM_LIBC_UTILS_FPUTIL_DUMMY_FENVIMPL_H #include #include @@ -36,4 +36,4 @@ static inline int setEnv(const fenv_t *) { return 0; } } // namespace fputil } // namespace __llvm_libc -#endif // LLVM_LIBC_UTILS_FPUTIL_DUMMY_FENV_H +#endif // LLVM_LIBC_UTILS_FPUTIL_DUMMY_FENVIMPL_H diff --git a/libc/utils/FPUtil/FEnv.h b/libc/utils/FPUtil/FEnvUtils.h similarity index 66% rename from libc/utils/FPUtil/FEnv.h rename to libc/utils/FPUtil/FEnvUtils.h index 1634f5f..2013830 100644 --- a/libc/utils/FPUtil/FEnv.h +++ b/libc/utils/FPUtil/FEnvUtils.h @@ -6,15 +6,15 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_LIBC_UTILS_FPUTIL_FENV_H -#define LLVM_LIBC_UTILS_FPUTIL_FENV_H +#ifndef LLVM_LIBC_UTILS_FPUTIL_FENVUTILS_H +#define LLVM_LIBC_UTILS_FPUTIL_FENVUTILS_H #ifdef __x86_64__ -#include "x86_64/FEnv.h" +#include "x86_64/FEnvImpl.h" #elif defined(__aarch64__) -#include "aarch64/FEnv.h" +#include "aarch64/FEnvImpl.h" #else -#include "DummyFEnv.h" +#include "DummyFEnvImpl.h" #endif -#endif // LLVM_LIBC_UTILS_FPUTIL_FP_BITS_H +#endif // LLVM_LIBC_UTILS_FPUTIL_FENVUTILS_H diff --git a/libc/utils/FPUtil/NearestIntegerOperations.h b/libc/utils/FPUtil/NearestIntegerOperations.h index a5f7e17..8dc4e23 100644 --- a/libc/utils/FPUtil/NearestIntegerOperations.h +++ b/libc/utils/FPUtil/NearestIntegerOperations.h @@ -9,7 +9,7 @@ #ifndef LLVM_LIBC_UTILS_FPUTIL_NEAREST_INTEGER_OPERATIONS_H #define LLVM_LIBC_UTILS_FPUTIL_NEAREST_INTEGER_OPERATIONS_H -#include "FEnv.h" +#include "FEnvUtils.h" #include "FPBits.h" #include "utils/CPP/TypeTraits.h" diff --git a/libc/utils/FPUtil/aarch64/FEnv.h b/libc/utils/FPUtil/aarch64/FEnvImpl.h similarity index 97% rename from libc/utils/FPUtil/aarch64/FEnv.h rename to libc/utils/FPUtil/aarch64/FEnvImpl.h index 93af9a2..1c7ac85 100644 --- a/libc/utils/FPUtil/aarch64/FEnv.h +++ b/libc/utils/FPUtil/aarch64/FEnvImpl.h @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_LIBC_UTILS_FPUTIL_AARCH64_FENV_H -#define LLVM_LIBC_UTILS_FPUTIL_AARCH64_FENV_H +#ifndef LLVM_LIBC_UTILS_FPUTIL_AARCH64_FENVIMPL_H +#define LLVM_LIBC_UTILS_FPUTIL_AARCH64_FENVIMPL_H #include #include @@ -232,4 +232,4 @@ static inline int setEnv(const fenv_t *envp) { } // namespace fputil } // namespace __llvm_libc -#endif // LLVM_LIBC_UTILS_FPUTIL_AARCH64_FENV_H +#endif // LLVM_LIBC_UTILS_FPUTIL_AARCH64_FENVIMPL_H diff --git a/libc/utils/FPUtil/x86_64/FEnv.h b/libc/utils/FPUtil/x86_64/FEnvImpl.h similarity index 98% rename from libc/utils/FPUtil/x86_64/FEnv.h rename to libc/utils/FPUtil/x86_64/FEnvImpl.h index 8ae10af..b67222b 100644 --- a/libc/utils/FPUtil/x86_64/FEnv.h +++ b/libc/utils/FPUtil/x86_64/FEnvImpl.h @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_LIBC_UTILS_FPUTIL_X86_64_FENV_H -#define LLVM_LIBC_UTILS_FPUTIL_X86_64_FENV_H +#ifndef LLVM_LIBC_UTILS_FPUTIL_X86_64_FENVIMPL_H +#define LLVM_LIBC_UTILS_FPUTIL_X86_64_FENVIMPL_H #include #include @@ -370,4 +370,4 @@ static inline int setEnv(const fenv_t *envp) { } // namespace fputil } // namespace __llvm_libc -#endif // LLVM_LIBC_UTILS_FPUTIL_X86_64_FENV_H +#endif // LLVM_LIBC_UTILS_FPUTIL_X86_64_FENVIMPL_H -- 2.7.4