Skip to content

Commit

Permalink
[libc] Switch functions to using global headers
Browse files Browse the repository at this point in the history
This switches all of the files in src/string, src/math, and
test/src/math from using relative paths (e.g. `#include “include/string.h”`)
to global paths (e.g. `#include <string.h>`) to make bringing up those
functions on other platforms, such as fuchsia, easier.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D91394
  • Loading branch information
michaelrj-google committed Nov 21, 2020
1 parent 244022a commit 3e18fb3
Show file tree
Hide file tree
Showing 62 changed files with 63 additions and 63 deletions.
2 changes: 1 addition & 1 deletion libc/src/math/cosf.cpp
Expand Up @@ -9,8 +9,8 @@
#include "math_utils.h"
#include "sincosf_utils.h"

#include "include/math.h"
#include "src/__support/common.h"
#include <math.h>

#include <stdint.h>

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/exp2f.cpp
Expand Up @@ -9,8 +9,8 @@
#include "exp_utils.h"
#include "math_utils.h"

#include "include/math.h"
#include "src/__support/common.h"
#include <math.h>

#include <stdint.h>

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/expf.cpp
Expand Up @@ -9,8 +9,8 @@
#include "exp_utils.h"
#include "math_utils.h"

#include "include/math.h"
#include "src/__support/common.h"
#include <math.h>

#include <stdint.h>

Expand Down
4 changes: 2 additions & 2 deletions libc/src/math/math_utils.h
Expand Up @@ -9,11 +9,11 @@
#ifndef LLVM_LIBC_SRC_MATH_MATH_UTILS_H
#define LLVM_LIBC_SRC_MATH_MATH_UTILS_H

#include "include/errno.h"
#include "include/math.h"
#include "src/__support/common.h"
#include "src/errno/llvmlibc_errno.h"
#include "utils/CPP/TypeTraits.h"
#include <errno.h>
#include <math.h>

#include <stdint.h>

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/sincosf.cpp
Expand Up @@ -9,8 +9,8 @@
#include "math_utils.h"
#include "sincosf_utils.h"

#include "include/math.h"
#include "src/__support/common.h"
#include <math.h>

#include <stdint.h>

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/sinf.cpp
Expand Up @@ -9,8 +9,8 @@
#include "math_utils.h"
#include "sincosf_utils.h"

#include "include/math.h"
#include "src/__support/common.h"
#include <math.h>

#include <stdint.h>

Expand Down
2 changes: 1 addition & 1 deletion libc/src/string/strcat.h
Expand Up @@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC_STRING_STRCAT_H
#define LLVM_LIBC_SRC_STRING_STRCAT_H

#include "include/string.h"
#include <string.h>

namespace __llvm_libc {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/string/strcpy.h
Expand Up @@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC_STRING_STRCPY_H
#define LLVM_LIBC_SRC_STRING_STRCPY_H

#include "include/string.h"
#include <string.h>

namespace __llvm_libc {

Expand Down
2 changes: 1 addition & 1 deletion libc/src/string/strlen.h
Expand Up @@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC_STRING_STRLEN_H
#define LLVM_LIBC_SRC_STRING_STRLEN_H

#include "include/string.h"
#include <string.h>

namespace __llvm_libc {

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/FDimTest.h
Expand Up @@ -6,11 +6,11 @@
//
//===---------------------------------------------------------------------===//

#include "include/math.h"
#include "utils/FPUtil/BasicOperations.h"
#include "utils/FPUtil/FPBits.h"
#include "utils/FPUtil/TestHelpers.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

template <typename T>
class FDimTestTemplate : public __llvm_libc::testing::Test {
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/ILogbTest.h
Expand Up @@ -9,10 +9,10 @@
#ifndef LLVM_LIBC_TEST_SRC_MATH_ILOGBTEST_H
#define LLVM_LIBC_TEST_SRC_MATH_ILOGBTEST_H

#include "include/math.h"
#include "utils/FPUtil/FPBits.h"
#include "utils/FPUtil/ManipulationFunctions.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

#include <limits.h>

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/ceil_test.cpp
Expand Up @@ -6,12 +6,12 @@
//
//===----------------------------------------------------------------------===//

#include "include/math.h"
#include "src/math/ceil.h"
#include "utils/FPUtil/FPBits.h"
#include "utils/FPUtil/TestHelpers.h"
#include "utils/MPFRWrapper/MPFRUtils.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

using FPBits = __llvm_libc::fputil::FPBits<double>;

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/ceilf_test.cpp
Expand Up @@ -6,12 +6,12 @@
//
//===----------------------------------------------------------------------===//

#include "include/math.h"
#include "src/math/ceilf.h"
#include "utils/FPUtil/FPBits.h"
#include "utils/FPUtil/TestHelpers.h"
#include "utils/MPFRWrapper/MPFRUtils.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

using FPBits = __llvm_libc::fputil::FPBits<float>;

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/ceill_test.cpp
Expand Up @@ -6,12 +6,12 @@
//
//===----------------------------------------------------------------------===//

#include "include/math.h"
#include "src/math/ceill.h"
#include "utils/FPUtil/FPBits.h"
#include "utils/FPUtil/TestHelpers.h"
#include "utils/MPFRWrapper/MPFRUtils.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

using FPBits = __llvm_libc::fputil::FPBits<long double>;

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/copysign_test.cpp
Expand Up @@ -6,11 +6,11 @@
//
//===----------------------------------------------------------------------===//

#include "include/math.h"
#include "src/math/copysign.h"
#include "utils/FPUtil/FPBits.h"
#include "utils/FPUtil/TestHelpers.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

using FPBits = __llvm_libc::fputil::FPBits<double>;

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/copysignf_test.cpp
Expand Up @@ -6,11 +6,11 @@
//
//===----------------------------------------------------------------------===//

#include "include/math.h"
#include "src/math/copysignf.h"
#include "utils/FPUtil/FPBits.h"
#include "utils/FPUtil/TestHelpers.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

using FPBits = __llvm_libc::fputil::FPBits<float>;

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/copysignl_test.cpp
Expand Up @@ -6,11 +6,11 @@
//
//===----------------------------------------------------------------------===//

#include "include/math.h"
#include "src/math/copysignl.h"
#include "utils/FPUtil/FPBits.h"
#include "utils/FPUtil/TestHelpers.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

using FPBits = __llvm_libc::fputil::FPBits<long double>;

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/cosf_test.cpp
Expand Up @@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//

#include "include/errno.h"
#include "include/math.h"
#include "src/errno/llvmlibc_errno.h"
#include "src/math/cosf.h"
#include "test/src/math/sdcomp26094.h"
Expand All @@ -18,6 +17,7 @@
#include "utils/FPUtil/FloatProperties.h"
#include "utils/MPFRWrapper/MPFRUtils.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

#include <stdint.h>

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/exp2f_test.cpp
Expand Up @@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//

#include "include/errno.h"
#include "include/math.h"
#include "src/errno/llvmlibc_errno.h"
#include "src/math/exp2f.h"
#include "utils/FPUtil/BitPatterns.h"
Expand All @@ -16,6 +15,7 @@
#include "utils/FPUtil/FloatProperties.h"
#include "utils/MPFRWrapper/MPFRUtils.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

#include <stdint.h>

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/expf_test.cpp
Expand Up @@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//

#include "include/errno.h"
#include "include/math.h"
#include "src/errno/llvmlibc_errno.h"
#include "src/math/expf.h"
#include "utils/FPUtil/BitPatterns.h"
Expand All @@ -16,6 +15,7 @@
#include "utils/FPUtil/FloatProperties.h"
#include "utils/MPFRWrapper/MPFRUtils.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

#include <stdint.h>

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/fabs_test.cpp
Expand Up @@ -6,12 +6,12 @@
//
//===----------------------------------------------------------------------===//

#include "include/math.h"
#include "src/math/fabs.h"
#include "utils/FPUtil/FPBits.h"
#include "utils/FPUtil/TestHelpers.h"
#include "utils/MPFRWrapper/MPFRUtils.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

using FPBits = __llvm_libc::fputil::FPBits<double>;

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/fabsf_test.cpp
Expand Up @@ -6,12 +6,12 @@
//
//===----------------------------------------------------------------------===//

#include "include/math.h"
#include "src/math/fabsf.h"
#include "utils/FPUtil/FPBits.h"
#include "utils/FPUtil/TestHelpers.h"
#include "utils/MPFRWrapper/MPFRUtils.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

using FPBits = __llvm_libc::fputil::FPBits<float>;

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/fabsl_test.cpp
Expand Up @@ -6,12 +6,12 @@
//
//===----------------------------------------------------------------------===//

#include "include/math.h"
#include "src/math/fabsl.h"
#include "utils/FPUtil/FPBits.h"
#include "utils/FPUtil/TestHelpers.h"
#include "utils/MPFRWrapper/MPFRUtils.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

using FPBits = __llvm_libc::fputil::FPBits<long double>;

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/fdim_test.cpp
Expand Up @@ -8,11 +8,11 @@

#include "FDimTest.h"

#include "include/math.h"
#include "src/math/fdim.h"
#include "utils/FPUtil/FPBits.h"
#include "utils/FPUtil/TestHelpers.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

using FDimTest = FDimTestTemplate<double>;

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/fdimf_test.cpp
Expand Up @@ -8,11 +8,11 @@

#include "FDimTest.h"

#include "include/math.h"
#include "src/math/fdimf.h"
#include "utils/FPUtil/FPBits.h"
#include "utils/FPUtil/TestHelpers.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

using FDimTest = FDimTestTemplate<float>;

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/fdiml_test.cpp
Expand Up @@ -8,11 +8,11 @@

#include "FDimTest.h"

#include "include/math.h"
#include "src/math/fdiml.h"
#include "utils/FPUtil/FPBits.h"
#include "utils/FPUtil/TestHelpers.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

using FDimTest = FDimTestTemplate<long double>;

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/floor_test.cpp
Expand Up @@ -6,12 +6,12 @@
//
//===----------------------------------------------------------------------===//

#include "include/math.h"
#include "src/math/floor.h"
#include "utils/FPUtil/FPBits.h"
#include "utils/FPUtil/TestHelpers.h"
#include "utils/MPFRWrapper/MPFRUtils.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

using FPBits = __llvm_libc::fputil::FPBits<double>;

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/floorf_test.cpp
Expand Up @@ -6,12 +6,12 @@
//
//===----------------------------------------------------------------------===//

#include "include/math.h"
#include "src/math/floorf.h"
#include "utils/FPUtil/FPBits.h"
#include "utils/FPUtil/TestHelpers.h"
#include "utils/MPFRWrapper/MPFRUtils.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

using FPBits = __llvm_libc::fputil::FPBits<float>;

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/floorl_test.cpp
Expand Up @@ -6,12 +6,12 @@
//
//===----------------------------------------------------------------------===//

#include "include/math.h"
#include "src/math/floorl.h"
#include "utils/FPUtil/FPBits.h"
#include "utils/FPUtil/TestHelpers.h"
#include "utils/MPFRWrapper/MPFRUtils.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

using FPBits = __llvm_libc::fputil::FPBits<long double>;

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/fmax_test.cpp
Expand Up @@ -6,11 +6,11 @@
//
//===---------------------------------------------------------------------===//

#include "include/math.h"
#include "src/math/fmax.h"
#include "utils/FPUtil/FPBits.h"
#include "utils/FPUtil/TestHelpers.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

using FPBits = __llvm_libc::fputil::FPBits<double>;

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/fmaxf_test.cpp
Expand Up @@ -6,11 +6,11 @@
//
//===---------------------------------------------------------------------===//

#include "include/math.h"
#include "src/math/fmaxf.h"
#include "utils/FPUtil/FPBits.h"
#include "utils/FPUtil/TestHelpers.h"
#include "utils/UnitTest/Test.h"
#include <math.h>

using FPBits = __llvm_libc::fputil::FPBits<float>;

Expand Down

0 comments on commit 3e18fb3

Please sign in to comment.