Skip to content

Commit b02ca09

Browse files
[libc][NFC] add includes for internal headers to all libc functions
this will make sure that all of the functions are using the correct prototypes. Explained much better in the comments of this diff: https://reviews.llvm.org/D94195
1 parent a0b65a7 commit b02ca09

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+95
-3
lines changed

libc/src/__support/common.h.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
#ifdef LLVM_LIBC_PUBLIC_PACKAGING
2323
#define LLVM_LIBC_FUNCTION(type, name, arglist) \
24-
type name arglist; \
2524
LLVM_LIBC_FUNCTION_ATTR decltype(__llvm_libc::name) __##name##_impl__ __asm__(#name); \
2625
decltype(__llvm_libc::name) name [[gnu::alias(#name)]]; \
2726
type __##name##_impl__ arglist

libc/src/fenv/feclearexcept.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/fenv/feclearexcept.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/FEnv.h"
1112

libc/src/fenv/fegetround.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/fenv/fegetround.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/FEnv.h"
1112

libc/src/fenv/feraiseexcept.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/fenv/feraiseexcept.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/FEnv.h"
1112

libc/src/fenv/fesetround.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/fenv/fesetround.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/FEnv.h"
1112

libc/src/fenv/fetestexcept.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/fenv/fetestexcept.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/FEnv.h"
1112

libc/src/math/ceil.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/ceil.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/NearestIntegerOperations.h"
1112

libc/src/math/ceilf.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/ceilf.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/NearestIntegerOperations.h"
1112

libc/src/math/ceill.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/ceill.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/NearestIntegerOperations.h"
1112

libc/src/math/copysign.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/copysign.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/ManipulationFunctions.h"
1112

libc/src/math/copysignf.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/copysignf.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/ManipulationFunctions.h"
1112

libc/src/math/copysignl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/copysignl.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/ManipulationFunctions.h"
1112

libc/src/math/cosf.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/cosf.h"
910
#include "math_utils.h"
1011
#include "sincosf_utils.h"
1112

libc/src/math/exp2f.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/exp2f.h"
910
#include "exp_utils.h"
1011
#include "math_utils.h"
1112

libc/src/math/exp_utils.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/exp_utils.h"
910
#include "exp_utils.h"
1011

1112
#include "math_utils.h"

libc/src/math/expf.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/expf.h"
910
#include "exp_utils.h"
1011
#include "math_utils.h"
1112

libc/src/math/fabs.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/fabs.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/BasicOperations.h"
1112

libc/src/math/fabsf.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/fabsf.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/BasicOperations.h"
1112

libc/src/math/fabsl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/fabsl.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/BasicOperations.h"
1112

libc/src/math/fdim.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/fdim.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/BasicOperations.h"
1112

libc/src/math/fdimf.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/fdimf.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/BasicOperations.h"
1112

libc/src/math/fdiml.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/fdiml.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/BasicOperations.h"
1112

libc/src/math/floor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/floor.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/NearestIntegerOperations.h"
1112

libc/src/math/floorf.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/floorf.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/NearestIntegerOperations.h"
1112

libc/src/math/floorl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/floorl.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/NearestIntegerOperations.h"
1112

libc/src/math/fmaf.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/fmaf.h"
910
#include "src/__support/common.h"
1011

1112
#include "utils/FPUtil/FEnv.h"

libc/src/math/fmax.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/fmax.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/BasicOperations.h"
1112

libc/src/math/fmaxf.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/fmaxf.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/BasicOperations.h"
1112

libc/src/math/fmaxl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/fmaxl.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/BasicOperations.h"
1112

libc/src/math/fmin.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/fmin.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/BasicOperations.h"
1112

libc/src/math/fminf.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/fminf.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/BasicOperations.h"
1112

libc/src/math/fminl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/fminl.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/BasicOperations.h"
1112

libc/src/math/frexp.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/frexp.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/ManipulationFunctions.h"
1112

libc/src/math/frexpf.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/frexpf.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/ManipulationFunctions.h"
1112

libc/src/math/frexpl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/frexpl.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/ManipulationFunctions.h"
1112

libc/src/math/hypot.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "utils/FPUtil/Hypot.h"
9+
#include "src/math/hypot.h"
1010
#include "src/__support/common.h"
11+
#include "utils/FPUtil/Hypot.h"
1112

1213
namespace __llvm_libc {
1314

libc/src/math/hypotf.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8+
#include "src/math/hypotf.h"
89
#include "src/__support/common.h"
910
#include "utils/FPUtil/Hypot.h"
1011

libc/src/math/ilogb.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/ilogb.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/ManipulationFunctions.h"
1112

libc/src/math/ilogbf.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/ilogbf.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/ManipulationFunctions.h"
1112

libc/src/math/ilogbl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/ilogbl.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/ManipulationFunctions.h"
1112

libc/src/math/ldexp.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/ldexp.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/ManipulationFunctions.h"
1112

libc/src/math/ldexpf.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/ldexpf.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/ManipulationFunctions.h"
1112

libc/src/math/ldexpl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/ldexpl.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/ManipulationFunctions.h"
1112

libc/src/math/llrint.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/llrint.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/NearestIntegerOperations.h"
1112

libc/src/math/llrintf.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/llrintf.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/NearestIntegerOperations.h"
1112

libc/src/math/llrintl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/llrintl.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/NearestIntegerOperations.h"
1112

libc/src/math/llround.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/llround.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/NearestIntegerOperations.h"
1112

libc/src/math/llroundf.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/llroundf.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/NearestIntegerOperations.h"
1112

libc/src/math/llroundl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/math/llroundl.h"
910
#include "src/__support/common.h"
1011
#include "utils/FPUtil/NearestIntegerOperations.h"
1112

0 commit comments

Comments
 (0)