2 changes: 1 addition & 1 deletion libc/src/math/fabs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

namespace __llvm_libc {

double LLVM_LIBC_ENTRYPOINT(fabs)(double x) { return fputil::abs(x); }
LLVM_LIBC_FUNCTION(double, fabs, (double x)) { return fputil::abs(x); }

} // namespace __llvm_libc
2 changes: 1 addition & 1 deletion libc/src/math/fabsf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

namespace __llvm_libc {

float LLVM_LIBC_ENTRYPOINT(fabsf)(float x) { return fputil::abs(x); }
LLVM_LIBC_FUNCTION(float, fabsf, (float x)) { return fputil::abs(x); }

} // namespace __llvm_libc
2 changes: 1 addition & 1 deletion libc/src/math/fabsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long double LLVM_LIBC_ENTRYPOINT(fabsl)(long double x) {
LLVM_LIBC_FUNCTION(long double, fabsl, (long double x)) {
return fputil::abs(x);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/fdim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

double LLVM_LIBC_ENTRYPOINT(fdim)(double x, double y) {
LLVM_LIBC_FUNCTION(double, fdim, (double x, double y)) {
return fputil::fdim(x, y);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/fdimf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

float LLVM_LIBC_ENTRYPOINT(fdimf)(float x, float y) {
LLVM_LIBC_FUNCTION(float, fdimf, (float x, float y)) {
return fputil::fdim(x, y);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/fdiml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long double LLVM_LIBC_ENTRYPOINT(fdiml)(long double x, long double y) {
LLVM_LIBC_FUNCTION(long double, fdiml, (long double x, long double y)) {
return fputil::fdim(x, y);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/floor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

namespace __llvm_libc {

double LLVM_LIBC_ENTRYPOINT(floor)(double x) { return fputil::floor(x); }
LLVM_LIBC_FUNCTION(double, floor, (double x)) { return fputil::floor(x); }

} // namespace __llvm_libc
2 changes: 1 addition & 1 deletion libc/src/math/floorf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

namespace __llvm_libc {

float LLVM_LIBC_ENTRYPOINT(floorf)(float x) { return fputil::floor(x); }
LLVM_LIBC_FUNCTION(float, floorf, (float x)) { return fputil::floor(x); }

} // namespace __llvm_libc
2 changes: 1 addition & 1 deletion libc/src/math/floorl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long double LLVM_LIBC_ENTRYPOINT(floorl)(long double x) {
LLVM_LIBC_FUNCTION(long double, floorl, (long double x)) {
return fputil::floor(x);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/fmaf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace __llvm_libc {

float LLVM_LIBC_ENTRYPOINT(fmaf)(float x, float y, float z) {
LLVM_LIBC_FUNCTION(float, fmaf, (float x, float y, float z)){
// Product is exact.
double prod = static_cast<double>(x) * static_cast<double>(y);
double z_d = static_cast<double>(z);
Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/fmax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

double LLVM_LIBC_ENTRYPOINT(fmax)(double x, double y) {
LLVM_LIBC_FUNCTION(double, fmax, (double x, double y)) {
return fputil::fmax(x, y);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/fmaxf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

float LLVM_LIBC_ENTRYPOINT(fmaxf)(float x, float y) {
LLVM_LIBC_FUNCTION(float, fmaxf, (float x, float y)) {
return fputil::fmax(x, y);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/fmaxl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long double LLVM_LIBC_ENTRYPOINT(fmaxl)(long double x, long double y) {
LLVM_LIBC_FUNCTION(long double, fmaxl, (long double x, long double y)) {
return fputil::fmax(x, y);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/fmin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

double LLVM_LIBC_ENTRYPOINT(fmin)(double x, double y) {
LLVM_LIBC_FUNCTION(double, fmin, (double x, double y)) {
return fputil::fmin(x, y);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/fminf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

float LLVM_LIBC_ENTRYPOINT(fminf)(float x, float y) {
LLVM_LIBC_FUNCTION(float, fminf, (float x, float y)) {
return fputil::fmin(x, y);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/fminl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long double LLVM_LIBC_ENTRYPOINT(fminl)(long double x, long double y) {
LLVM_LIBC_FUNCTION(long double, fminl, (long double x, long double y)) {
return fputil::fmin(x, y);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/frexp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

double LLVM_LIBC_ENTRYPOINT(frexp)(double x, int *exp) {
LLVM_LIBC_FUNCTION(double, frexp, (double x, int *exp)) {
return fputil::frexp(x, *exp);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/frexpf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

float LLVM_LIBC_ENTRYPOINT(frexpf)(float x, int *exp) {
LLVM_LIBC_FUNCTION(float, frexpf, (float x, int *exp)) {
return fputil::frexp(x, *exp);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/frexpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long double LLVM_LIBC_ENTRYPOINT(frexpl)(long double x, int *exp) {
LLVM_LIBC_FUNCTION(long double, frexpl, (long double x, int *exp)) {
return fputil::frexp(x, *exp);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/hypot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

double LLVM_LIBC_ENTRYPOINT(hypot)(double x, double y) {
LLVM_LIBC_FUNCTION(double, hypot, (double x, double y)) {
return __llvm_libc::fputil::hypot(x, y);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/hypotf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace __llvm_libc {

float LLVM_LIBC_ENTRYPOINT(hypotf)(float x, float y) {
LLVM_LIBC_FUNCTION(float, hypotf, (float x, float y)) {
return __llvm_libc::fputil::hypot(x, y);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/ilogb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

namespace __llvm_libc {

int LLVM_LIBC_ENTRYPOINT(ilogb)(double x) { return fputil::ilogb(x); }
LLVM_LIBC_FUNCTION(int, ilogb, (double x)) { return fputil::ilogb(x); }

} // namespace __llvm_libc
2 changes: 1 addition & 1 deletion libc/src/math/ilogbf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

namespace __llvm_libc {

int LLVM_LIBC_ENTRYPOINT(ilogbf)(float x) { return fputil::ilogb(x); }
LLVM_LIBC_FUNCTION(int, ilogbf, (float x)) { return fputil::ilogb(x); }

} // namespace __llvm_libc
2 changes: 1 addition & 1 deletion libc/src/math/ilogbl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

namespace __llvm_libc {

int LLVM_LIBC_ENTRYPOINT(ilogbl)(long double x) { return fputil::ilogb(x); }
LLVM_LIBC_FUNCTION(int, ilogbl, (long double x)) { return fputil::ilogb(x); }

} // namespace __llvm_libc
2 changes: 1 addition & 1 deletion libc/src/math/ldexp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

double LLVM_LIBC_ENTRYPOINT(ldexp)(double x, int exp) {
LLVM_LIBC_FUNCTION(double, ldexp, (double x, int exp)) {
return fputil::ldexp(x, exp);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/ldexpf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

float LLVM_LIBC_ENTRYPOINT(ldexpf)(float x, int exp) {
LLVM_LIBC_FUNCTION(float, ldexpf, (float x, int exp)) {
return fputil::ldexp(x, exp);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/ldexpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long double LLVM_LIBC_ENTRYPOINT(ldexpl)(long double x, int exp) {
LLVM_LIBC_FUNCTION(long double, ldexpl, (long double x, int exp)) {
return fputil::ldexp(x, exp);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/llrint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long long LLVM_LIBC_ENTRYPOINT(llrint)(double x) {
LLVM_LIBC_FUNCTION(long long, llrint, (double x)) {
return fputil::roundToSignedIntegerUsingCurrentRoundingMode<double,
long long>(x);
}
Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/llrintf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long long LLVM_LIBC_ENTRYPOINT(llrintf)(float x) {
LLVM_LIBC_FUNCTION(long long, llrintf, (float x)) {
return fputil::roundToSignedIntegerUsingCurrentRoundingMode<float, long long>(
x);
}
Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/llrintl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long long LLVM_LIBC_ENTRYPOINT(llrintl)(long double x) {
LLVM_LIBC_FUNCTION(long long, llrintl, (long double x)) {
return fputil::roundToSignedIntegerUsingCurrentRoundingMode<long double,
long long>(x);
}
Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/llround.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long long LLVM_LIBC_ENTRYPOINT(llround)(double x) {
LLVM_LIBC_FUNCTION(long long, llround, (double x)) {
return fputil::roundToSignedInteger<double, long long>(x);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/llroundf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long long LLVM_LIBC_ENTRYPOINT(llroundf)(float x) {
LLVM_LIBC_FUNCTION(long long, llroundf, (float x)) {
return fputil::roundToSignedInteger<float, long long>(x);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/llroundl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long long LLVM_LIBC_ENTRYPOINT(llroundl)(long double x) {
LLVM_LIBC_FUNCTION(long long, llroundl, (long double x)) {
return fputil::roundToSignedInteger<long double, long long>(x);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/logb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

namespace __llvm_libc {

double LLVM_LIBC_ENTRYPOINT(logb)(double x) { return fputil::logb(x); }
LLVM_LIBC_FUNCTION(double, logb, (double x)) { return fputil::logb(x); }

} // namespace __llvm_libc
2 changes: 1 addition & 1 deletion libc/src/math/logbf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

namespace __llvm_libc {

float LLVM_LIBC_ENTRYPOINT(logbf)(float x) { return fputil::logb(x); }
LLVM_LIBC_FUNCTION(float, logbf, (float x)) { return fputil::logb(x); }

} // namespace __llvm_libc
2 changes: 1 addition & 1 deletion libc/src/math/logbl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long double LLVM_LIBC_ENTRYPOINT(logbl)(long double x) {
LLVM_LIBC_FUNCTION(long double, logbl, (long double x)) {
return fputil::logb(x);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/lrint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long LLVM_LIBC_ENTRYPOINT(lrint)(double x) {
LLVM_LIBC_FUNCTION(long, lrint, (double x)) {
return fputil::roundToSignedIntegerUsingCurrentRoundingMode<double, long>(x);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/lrintf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long LLVM_LIBC_ENTRYPOINT(lrintf)(float x) {
LLVM_LIBC_FUNCTION(long, lrintf, (float x)) {
return fputil::roundToSignedIntegerUsingCurrentRoundingMode<float, long>(x);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/lrintl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long LLVM_LIBC_ENTRYPOINT(lrintl)(long double x) {
LLVM_LIBC_FUNCTION(long, lrintl, (long double x)) {
return fputil::roundToSignedIntegerUsingCurrentRoundingMode<long double,
long>(x);
}
Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/lround.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long LLVM_LIBC_ENTRYPOINT(lround)(double x) {
LLVM_LIBC_FUNCTION(long, lround, (double x)) {
return fputil::roundToSignedInteger<double, long>(x);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/lroundf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long LLVM_LIBC_ENTRYPOINT(lroundf)(float x) {
LLVM_LIBC_FUNCTION(long, lroundf, (float x)) {
return fputil::roundToSignedInteger<float, long>(x);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/lroundl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long LLVM_LIBC_ENTRYPOINT(lroundl)(long double x) {
LLVM_LIBC_FUNCTION(long, lroundl, (long double x)) {
return fputil::roundToSignedInteger<long double, long>(x);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/modf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

double LLVM_LIBC_ENTRYPOINT(modf)(double x, double *iptr) {
LLVM_LIBC_FUNCTION(double, modf, (double x, double *iptr)) {
return fputil::modf(x, *iptr);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/modff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

float LLVM_LIBC_ENTRYPOINT(modff)(float x, float *iptr) {
LLVM_LIBC_FUNCTION(float, modff, (float x, float *iptr)) {
return fputil::modf(x, *iptr);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/modfl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long double LLVM_LIBC_ENTRYPOINT(modfl)(long double x, long double *iptr) {
LLVM_LIBC_FUNCTION(long double, modfl, (long double x, long double *iptr)) {
return fputil::modf(x, *iptr);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/nearbyint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

double LLVM_LIBC_ENTRYPOINT(nearbyint)(double x) {
LLVM_LIBC_FUNCTION(double, nearbyint, (double x)) {
return fputil::roundUsingCurrentRoundingMode(x);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/nearbyintf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

float LLVM_LIBC_ENTRYPOINT(nearbyintf)(float x) {
LLVM_LIBC_FUNCTION(float, nearbyintf, (float x)) {
return fputil::roundUsingCurrentRoundingMode(x);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/nearbyintl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long double LLVM_LIBC_ENTRYPOINT(nearbyintl)(long double x) {
LLVM_LIBC_FUNCTION(long double, nearbyintl, (long double x)) {
return fputil::roundUsingCurrentRoundingMode(x);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/nextafter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

double LLVM_LIBC_ENTRYPOINT(nextafter)(double x, double y) {
LLVM_LIBC_FUNCTION(double, nextafter, (double x, double y)) {
return fputil::nextafter(x, y);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/nextafterf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

float LLVM_LIBC_ENTRYPOINT(nextafterf)(float x, float y) {
LLVM_LIBC_FUNCTION(float, nextafterf, (float x, float y)) {
return fputil::nextafter(x, y);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/nextafterl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long double LLVM_LIBC_ENTRYPOINT(nextafterl)(long double x, long double y) {
LLVM_LIBC_FUNCTION(long double, nextafterl, (long double x, long double y)) {
return fputil::nextafter(x, y);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/remainder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

double LLVM_LIBC_ENTRYPOINT(remainder)(double x, double y) {
LLVM_LIBC_FUNCTION(double, remainder, (double x, double y)) {
int quotient;
return fputil::remquo(x, y, quotient);
}
Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/remainderf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

float LLVM_LIBC_ENTRYPOINT(remainderf)(float x, float y) {
LLVM_LIBC_FUNCTION(float, remainderf, (float x, float y)) {
int quotient;
return fputil::remquo(x, y, quotient);
}
Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/remainderl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long double LLVM_LIBC_ENTRYPOINT(remainderl)(long double x, long double y) {
LLVM_LIBC_FUNCTION(long double, remainderl, (long double x, long double y)) {
int quotient;
return fputil::remquo(x, y, quotient);
}
Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/remquo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

double LLVM_LIBC_ENTRYPOINT(remquo)(double x, double y, int *exp) {
LLVM_LIBC_FUNCTION(double, remquo, (double x, double y, int *exp)) {
return fputil::remquo(x, y, *exp);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/remquof.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

float LLVM_LIBC_ENTRYPOINT(remquof)(float x, float y, int *exp) {
LLVM_LIBC_FUNCTION(float, remquof, (float x, float y, int *exp)) {
return fputil::remquo(x, y, *exp);
}

Expand Down
4 changes: 2 additions & 2 deletions libc/src/math/remquol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace __llvm_libc {

long double LLVM_LIBC_ENTRYPOINT(remquol)(long double x, long double y,
int *exp) {
LLVM_LIBC_FUNCTION(long double, remquol,
(long double x, long double y, int *exp)) {
return fputil::remquo(x, y, *exp);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/rint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

double LLVM_LIBC_ENTRYPOINT(rint)(double x) {
LLVM_LIBC_FUNCTION(double, rint, (double x)) {
return fputil::roundUsingCurrentRoundingMode(x);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/rintf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

float LLVM_LIBC_ENTRYPOINT(rintf)(float x) {
LLVM_LIBC_FUNCTION(float, rintf, (float x)) {
return fputil::roundUsingCurrentRoundingMode(x);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/rintl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long double LLVM_LIBC_ENTRYPOINT(rintl)(long double x) {
LLVM_LIBC_FUNCTION(long double, rintl, (long double x)) {
return fputil::roundUsingCurrentRoundingMode(x);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/round.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

namespace __llvm_libc {

double LLVM_LIBC_ENTRYPOINT(round)(double x) { return fputil::round(x); }
LLVM_LIBC_FUNCTION(double, round, (double x)) { return fputil::round(x); }

} // namespace __llvm_libc
2 changes: 1 addition & 1 deletion libc/src/math/roundf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

namespace __llvm_libc {

float LLVM_LIBC_ENTRYPOINT(roundf)(float x) { return fputil::round(x); }
LLVM_LIBC_FUNCTION(float, roundf, (float x)) { return fputil::round(x); }

} // namespace __llvm_libc
2 changes: 1 addition & 1 deletion libc/src/math/roundl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long double LLVM_LIBC_ENTRYPOINT(roundl)(long double x) {
LLVM_LIBC_FUNCTION(long double, roundl, (long double x)) {
return fputil::round(x);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/sincosf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace __llvm_libc {
// error is 0.5303 * 2^-23. A single-step range reduction is used for
// small values. Large inputs have their range reduced using fast integer
// arithmetic.
void LLVM_LIBC_ENTRYPOINT(sincosf)(float y, float *sinp, float *cosp) {
LLVM_LIBC_FUNCTION(void, sincosf, (float y, float *sinp, float *cosp)) {
double x = y;
double s;
int n;
Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/sinf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace __llvm_libc {
// error is 0.5303 * 2^-23. A single-step range reduction is used for
// small values. Large inputs have their range reduced using fast integer
// arithmetic.
float LLVM_LIBC_ENTRYPOINT(sinf)(float y) {
LLVM_LIBC_FUNCTION(float, sinf, (float y)) {
double x = y;
double s;
int n;
Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/sqrt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

namespace __llvm_libc {

double LLVM_LIBC_ENTRYPOINT(sqrt)(double x) { return fputil::sqrt(x); }
LLVM_LIBC_FUNCTION(double, sqrt, (double x)) { return fputil::sqrt(x); }

} // namespace __llvm_libc
2 changes: 1 addition & 1 deletion libc/src/math/sqrtf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

namespace __llvm_libc {

float LLVM_LIBC_ENTRYPOINT(sqrtf)(float x) { return fputil::sqrt(x); }
LLVM_LIBC_FUNCTION(float, sqrtf, (float x)) { return fputil::sqrt(x); }

} // namespace __llvm_libc
2 changes: 1 addition & 1 deletion libc/src/math/sqrtl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long double LLVM_LIBC_ENTRYPOINT(sqrtl)(long double x) {
LLVM_LIBC_FUNCTION(long double, sqrtl, (long double x)) {
return fputil::sqrt(x);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/trunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

namespace __llvm_libc {

double LLVM_LIBC_ENTRYPOINT(trunc)(double x) { return fputil::trunc(x); }
LLVM_LIBC_FUNCTION(double, trunc, (double x)) { return fputil::trunc(x); }

} // namespace __llvm_libc
2 changes: 1 addition & 1 deletion libc/src/math/truncf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

namespace __llvm_libc {

float LLVM_LIBC_ENTRYPOINT(truncf)(float x) { return fputil::trunc(x); }
LLVM_LIBC_FUNCTION(float, truncf, (float x)) { return fputil::trunc(x); }

} // namespace __llvm_libc
2 changes: 1 addition & 1 deletion libc/src/math/truncl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace __llvm_libc {

long double LLVM_LIBC_ENTRYPOINT(truncl)(long double x) {
LLVM_LIBC_FUNCTION(long double, truncl, (long double x)) {
return fputil::trunc(x);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/signal/linux/raise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace __llvm_libc {

int LLVM_LIBC_ENTRYPOINT(raise)(int sig) {
LLVM_LIBC_FUNCTION(int, raise, (int sig)) {
__llvm_libc::Sigset sigset;
__llvm_libc::block_all_signals(sigset);
long pid = __llvm_libc::syscall(SYS_getpid);
Expand Down
6 changes: 3 additions & 3 deletions libc/src/signal/linux/sigaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ static void copySigaction(T &dest, const V &source) {
dest.sa_restorer = source.sa_restorer;
}

int LLVM_LIBC_ENTRYPOINT(sigaction)(
int signal, const struct __sigaction *__restrict libc_new,
struct __sigaction *__restrict libc_old) {
LLVM_LIBC_FUNCTION(int, sigaction,
(int signal, const struct __sigaction *__restrict libc_new,
struct __sigaction *__restrict libc_old)) {
struct sigaction kernel_new;
if (libc_new) {
copySigaction(kernel_new, *libc_new);
Expand Down
2 changes: 1 addition & 1 deletion libc/src/signal/linux/sigaddset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace __llvm_libc {

int LLVM_LIBC_ENTRYPOINT(sigaddset)(sigset_t *set, int signum) {
LLVM_LIBC_FUNCTION(int, sigaddset, (sigset_t * set, int signum)) {
if (!set || (unsigned)(signum - 1) >= (8 * sizeof(sigset_t))) {
llvmlibc_errno = EINVAL;
return -1;
Expand Down
2 changes: 1 addition & 1 deletion libc/src/signal/linux/sigdelset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace __llvm_libc {

int LLVM_LIBC_ENTRYPOINT(sigdelset)(sigset_t *set, int signum) {
LLVM_LIBC_FUNCTION(int, sigdelset, (sigset_t * set, int signum)) {
if (!set || (unsigned)(signum - 1) >= (8 * sizeof(sigset_t))) {
llvmlibc_errno = EINVAL;
return -1;
Expand Down
2 changes: 1 addition & 1 deletion libc/src/signal/linux/sigemptyset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace __llvm_libc {

int LLVM_LIBC_ENTRYPOINT(sigemptyset)(sigset_t *set) {
LLVM_LIBC_FUNCTION(int, sigemptyset, (sigset_t * set)) {
if (!set) {
llvmlibc_errno = EINVAL;
return -1;
Expand Down
2 changes: 1 addition & 1 deletion libc/src/signal/linux/sigfillset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace __llvm_libc {

int LLVM_LIBC_ENTRYPOINT(sigfillset)(sigset_t *set) {
LLVM_LIBC_FUNCTION(int, sigfillset, (sigset_t * set)) {
if (!set) {
llvmlibc_errno = EINVAL;
return -1;
Expand Down
2 changes: 1 addition & 1 deletion libc/src/signal/linux/signal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace __llvm_libc {

sighandler_t LLVM_LIBC_ENTRYPOINT(signal)(int signum, sighandler_t handler) {
LLVM_LIBC_FUNCTION(sighandler_t, signal, (int signum, sighandler_t handler)) {
struct __sigaction action, old;
action.sa_handler = handler;
action.sa_flags = SA_RESTART;
Expand Down
5 changes: 3 additions & 2 deletions libc/src/signal/linux/sigprocmask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@

namespace __llvm_libc {

int LLVM_LIBC_ENTRYPOINT(sigprocmask)(int how, const sigset_t *__restrict set,
sigset_t *__restrict oldset) {
LLVM_LIBC_FUNCTION(int, sigprocmask,
(int how, const sigset_t *__restrict set,
sigset_t *__restrict oldset)) {
int ret = __llvm_libc::syscall(SYS_rt_sigprocmask, how, set, oldset,
sizeof(sigset_t));
if (!ret)
Expand Down
2 changes: 1 addition & 1 deletion libc/src/stdlib/abort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace __llvm_libc {

void LLVM_LIBC_ENTRYPOINT(abort)() {
LLVM_LIBC_FUNCTION(void, abort, ()) {
// TODO: When sigprocmask and sigaction land:
// Unblock SIGABRT, raise it, if it was ignored or the handler returned,
// change its action to SIG_DFL, raise it again.
Expand Down
2 changes: 1 addition & 1 deletion libc/src/stdlib/abs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace __llvm_libc {

int LLVM_LIBC_ENTRYPOINT(abs)(int n) {
LLVM_LIBC_FUNCTION(int, abs, (int n)) {
// integer_abs from abs_utils.h.
return integer_abs(n);
}
Expand Down
2 changes: 1 addition & 1 deletion libc/src/stdlib/labs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace __llvm_libc {

long LLVM_LIBC_ENTRYPOINT(labs)(long n) {
LLVM_LIBC_FUNCTION(long, labs, (long n)) {
// integer_abs from abs_utils.h.
return integer_abs(n);
}
Expand Down
2 changes: 1 addition & 1 deletion libc/src/stdlib/linux/_Exit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace __llvm_libc {

void LLVM_LIBC_ENTRYPOINT(_Exit)(int status) {
LLVM_LIBC_FUNCTION(void, _Exit, (int status)) {
for (;;) {
__llvm_libc::syscall(SYS_exit_group, status);
__llvm_libc::syscall(SYS_exit, status);
Expand Down
2 changes: 1 addition & 1 deletion libc/src/stdlib/llabs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace __llvm_libc {

long long LLVM_LIBC_ENTRYPOINT(llabs)(long long n) {
LLVM_LIBC_FUNCTION(long long, llabs, (long long n)) {
// integer_abs from abs_utils.h.
return integer_abs(n);
}
Expand Down
2 changes: 1 addition & 1 deletion libc/src/string/bzero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace __llvm_libc {

void LLVM_LIBC_ENTRYPOINT(bzero)(void *ptr, size_t count) {
LLVM_LIBC_FUNCTION(void, bzero, (void *ptr, size_t count)) {
GeneralPurposeMemset(reinterpret_cast<char *>(ptr), 0, count);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/string/memchr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
namespace __llvm_libc {

// TODO: Look at performance benefits of comparing words.
void *LLVM_LIBC_ENTRYPOINT(memchr)(const void *src, int c, size_t n) {
LLVM_LIBC_FUNCTION(void *, memchr, (const void *src, int c, size_t n)) {
return internal::find_first_character(
reinterpret_cast<const unsigned char *>(src), c, n);
}
Expand Down
4 changes: 2 additions & 2 deletions libc/src/string/memcmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
namespace __llvm_libc {

// TODO: It is a simple implementation, an optimized version is preparing.
int LLVM_LIBC_ENTRYPOINT(memcmp)(const void *lhs, const void *rhs,
size_t count) {
LLVM_LIBC_FUNCTION(int, memcmp,
(const void *lhs, const void *rhs, size_t count)) {
const unsigned char *_lhs = reinterpret_cast<const unsigned char *>(lhs);
const unsigned char *_rhs = reinterpret_cast<const unsigned char *>(rhs);
for (size_t i = 0; i < count; ++i)
Expand Down
5 changes: 3 additions & 2 deletions libc/src/string/memcpy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ static void memcpy_impl(char *__restrict dst, const char *__restrict src,
return CopyAlignedBlocks<32>(dst, src, count);
}

void *LLVM_LIBC_ENTRYPOINT(memcpy)(void *__restrict dst,
const void *__restrict src, size_t size) {
LLVM_LIBC_FUNCTION(void *, memcpy,
(void *__restrict dst, const void *__restrict src,
size_t size)) {
memcpy_impl(reinterpret_cast<char *>(dst),
reinterpret_cast<const char *>(src), size);
return dst;
Expand Down
2 changes: 1 addition & 1 deletion libc/src/string/memrchr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace __llvm_libc {

void *LLVM_LIBC_ENTRYPOINT(memrchr)(const void *src, int c, size_t n) {
LLVM_LIBC_FUNCTION(void *, memrchr, (const void *src, int c, size_t n)) {
const unsigned char *str = reinterpret_cast<const unsigned char *>(src);
const unsigned char ch = c;
for (; n != 0; --n) {
Expand Down
2 changes: 1 addition & 1 deletion libc/src/string/memset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace __llvm_libc {

void *LLVM_LIBC_ENTRYPOINT(memset)(void *dst, int value, size_t count) {
LLVM_LIBC_FUNCTION(void *, memset, (void *dst, int value, size_t count)) {
GeneralPurposeMemset(reinterpret_cast<char *>(dst),
static_cast<unsigned char>(value), count);
return dst;
Expand Down
4 changes: 2 additions & 2 deletions libc/src/string/strcat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

namespace __llvm_libc {

char *LLVM_LIBC_ENTRYPOINT(strcat)(char *__restrict dest,
const char *__restrict src) {
LLVM_LIBC_FUNCTION(char *, strcat,
(char *__restrict dest, const char *__restrict src)) {
__llvm_libc::strcpy(dest + internal::string_length(dest), src);
return dest;
}
Expand Down
2 changes: 1 addition & 1 deletion libc/src/string/strchr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace __llvm_libc {

// TODO: Look at performance benefits of comparing words.
char *LLVM_LIBC_ENTRYPOINT(strchr)(const char *src, int c) {
LLVM_LIBC_FUNCTION(char *, strchr, (const char *src, int c)) {
unsigned char *str =
const_cast<unsigned char *>(reinterpret_cast<const unsigned char *>(src));
const unsigned char ch = c;
Expand Down
2 changes: 1 addition & 1 deletion libc/src/string/strcmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace __llvm_libc {

// TODO: Look at benefits for comparing words at a time.
int LLVM_LIBC_ENTRYPOINT(strcmp)(const char *left, const char *right) {
LLVM_LIBC_FUNCTION(int, strcmp, (const char *left, const char *right)) {
for (; *left && *left == *right; ++left, ++right)
;
return *reinterpret_cast<const unsigned char *>(left) -
Expand Down
4 changes: 2 additions & 2 deletions libc/src/string/strcpy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

namespace __llvm_libc {

char *LLVM_LIBC_ENTRYPOINT(strcpy)(char *__restrict dest,
const char *__restrict src) {
LLVM_LIBC_FUNCTION(char *, strcpy,
(char *__restrict dest, const char *__restrict src)) {
return reinterpret_cast<char *>(
__llvm_libc::memcpy(dest, src, internal::string_length(src) + 1));
}
Expand Down
2 changes: 1 addition & 1 deletion libc/src/string/strcspn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace __llvm_libc {

size_t LLVM_LIBC_ENTRYPOINT(strcspn)(const char *src, const char *segment) {
LLVM_LIBC_FUNCTION(size_t, strcspn, (const char *src, const char *segment)) {
return internal::complementary_span(src, segment);
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/string/strlen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace __llvm_libc {

// TODO: investigate the performance of this function.
// There might be potential for compiler optimization.
size_t LLVM_LIBC_ENTRYPOINT(strlen)(const char *src) {
LLVM_LIBC_FUNCTION(size_t, strlen, (const char *src)) {
return internal::string_length(src);
}

Expand Down
5 changes: 3 additions & 2 deletions libc/src/string/strncpy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@

namespace __llvm_libc {

char *LLVM_LIBC_ENTRYPOINT(strncpy)(char *__restrict dest,
const char *__restrict src, size_t n) {
LLVM_LIBC_FUNCTION(char *, strncpy,
(char *__restrict dest, const char *__restrict src,
size_t n)) {
size_t i = 0;
// Copy up until \0 is found.
for (; i < n && src[i] != '\0'; ++i)
Expand Down
2 changes: 1 addition & 1 deletion libc/src/string/strnlen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace __llvm_libc {

size_t LLVM_LIBC_ENTRYPOINT(strnlen)(const char *src, size_t n) {
LLVM_LIBC_FUNCTION(size_t, strnlen, (const char *src, size_t n)) {
const void *temp = internal::find_first_character(
reinterpret_cast<const unsigned char *>(src), '\0', n);
return temp ? reinterpret_cast<const char *>(temp) - src : n;
Expand Down
2 changes: 1 addition & 1 deletion libc/src/string/strpbrk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace __llvm_libc {

char *LLVM_LIBC_ENTRYPOINT(strpbrk)(const char *src, const char *breakset) {
LLVM_LIBC_FUNCTION(char *, strpbrk, (const char *src, const char *breakset)) {
src += internal::complementary_span(src, breakset);
return *src ? const_cast<char *>(src) : nullptr;
}
Expand Down
2 changes: 1 addition & 1 deletion libc/src/string/strrchr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace __llvm_libc {

char *LLVM_LIBC_ENTRYPOINT(strrchr)(const char *src, int c) {
LLVM_LIBC_FUNCTION(char *, strrchr, (const char *src, int c)) {
const char ch = c;
char *last_occurrence = nullptr;
do {
Expand Down
2 changes: 1 addition & 1 deletion libc/src/string/strspn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace __llvm_libc {

size_t LLVM_LIBC_ENTRYPOINT(strspn)(const char *src, const char *segment) {
LLVM_LIBC_FUNCTION(size_t, strspn, (const char *src, const char *segment)) {
const char *initial = src;
cpp::Bitset<256> bitset;

Expand Down
2 changes: 1 addition & 1 deletion libc/src/string/strstr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace __llvm_libc {

// TODO: This is a simple brute force implementation. This can be
// improved upon using well known string matching algorithms.
char *LLVM_LIBC_ENTRYPOINT(strstr)(const char *haystack, const char *needle) {
LLVM_LIBC_FUNCTION(char *, strstr, (const char *haystack, const char *needle)) {
for (size_t i = 0; haystack[i]; ++i) {
size_t j;
for (j = 0; haystack[i + j] && haystack[i + j] == needle[j]; ++j)
Expand Down
5 changes: 3 additions & 2 deletions libc/src/string/strtok.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ namespace __llvm_libc {

static char *strtok_str = nullptr;

char *LLVM_LIBC_ENTRYPOINT(strtok)(char *__restrict src,
const char *__restrict delimiter_string) {
LLVM_LIBC_FUNCTION(char *, strtok,
(char *__restrict src,
const char *__restrict delimiter_string)) {
return internal::string_token(src, delimiter_string, &strtok_str);
}

Expand Down
7 changes: 4 additions & 3 deletions libc/src/string/strtok_r.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@

namespace __llvm_libc {

char *LLVM_LIBC_ENTRYPOINT(strtok_r)(char *__restrict src,
const char *__restrict delimiter_string,
char **__restrict saveptr) {
LLVM_LIBC_FUNCTION(char *, strtok_r,
(char *__restrict src,
const char *__restrict delimiter_string,
char **__restrict saveptr)) {
return internal::string_token(src, delimiter_string, saveptr);
}

Expand Down
5 changes: 3 additions & 2 deletions libc/src/string/x86/memcpy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ static void memcpy_x86(char *__restrict dst, const char *__restrict src,
return CopyRepMovsb(dst, src, count);
}

void *LLVM_LIBC_ENTRYPOINT(memcpy)(void *__restrict dst,
const void *__restrict src, size_t size) {
LLVM_LIBC_FUNCTION(void *, memcpy,
(void *__restrict dst, const void *__restrict src,
size_t size)) {
memcpy_x86(reinterpret_cast<char *>(dst), reinterpret_cast<const char *>(src),
size);
return dst;
Expand Down
5 changes: 3 additions & 2 deletions libc/src/sys/mman/linux/mmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ namespace __llvm_libc {

// This function is currently linux only. It has to be refactored suitably if
// mmap is to be supported on non-linux operating systems also.
void *LLVM_LIBC_ENTRYPOINT(mmap)(void *addr, size_t size, int prot, int flags,
int fd, off_t offset) {
LLVM_LIBC_FUNCTION(void *, mmap,
(void *addr, size_t size, int prot, int flags, int fd,
off_t offset)) {
// A lot of POSIX standard prescribed validation of the parameters is not
// done in this function as modern linux versions do it in the syscall.
// TODO: Perform argument validation not done by the linux syscall.
Expand Down
2 changes: 1 addition & 1 deletion libc/src/sys/mman/linux/munmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace __llvm_libc {

// This function is currently linux only. It has to be refactored suitably if
// mmap is to be supported on non-linux operating systems also.
int LLVM_LIBC_ENTRYPOINT(munmap)(void *addr, size_t size) {
LLVM_LIBC_FUNCTION(int, munmap, (void *addr, size_t size)) {
long ret_val =
__llvm_libc::syscall(SYS_munmap, reinterpret_cast<long>(addr), size);

Expand Down
3 changes: 2 additions & 1 deletion libc/src/threads/linux/call_once.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ static constexpr unsigned START = 0x11;
static constexpr unsigned WAITING = 0x22;
static constexpr unsigned FINISH = 0x33;

void LLVM_LIBC_ENTRYPOINT(call_once)(once_flag *flag, __call_once_func_t func) {
LLVM_LIBC_FUNCTION(void, call_once,
(once_flag * flag, __call_once_func_t func)) {
FutexData *futex_word = reinterpret_cast<FutexData *>(flag);
unsigned int not_called = ONCE_FLAG_INIT;

Expand Down
2 changes: 1 addition & 1 deletion libc/src/threads/linux/mtx_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace __llvm_libc {

int LLVM_LIBC_ENTRYPOINT(mtx_init)(mtx_t *mutex, int type) {
LLVM_LIBC_FUNCTION(int, mtx_init, (mtx_t * mutex, int type)) {
*(reinterpret_cast<uint32_t *>(mutex->__internal_data)) = MS_Free;
mutex->__mtx_type = type;
return thrd_success;
Expand Down
2 changes: 1 addition & 1 deletion libc/src/threads/linux/mtx_lock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
namespace __llvm_libc {

// The implementation currently handles only plain mutexes.
int LLVM_LIBC_ENTRYPOINT(mtx_lock)(mtx_t *mutex) {
LLVM_LIBC_FUNCTION(int, mtx_lock, (mtx_t * mutex)) {
FutexData *futex_data = reinterpret_cast<FutexData *>(mutex->__internal_data);
while (true) {
uint32_t mutex_status = MS_Free;
Expand Down
2 changes: 1 addition & 1 deletion libc/src/threads/linux/mtx_unlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
namespace __llvm_libc {

// The implementation currently handles only plain mutexes.
int LLVM_LIBC_ENTRYPOINT(mtx_unlock)(mtx_t *mutex) {
LLVM_LIBC_FUNCTION(int, mtx_unlock, (mtx_t * mutex)) {
FutexData *futex_word = reinterpret_cast<FutexData *>(mutex->__internal_data);
while (true) {
uint32_t mutex_status = MS_Waiting;
Expand Down
4 changes: 2 additions & 2 deletions libc/src/threads/linux/thrd_create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ static __attribute__((noinline)) void start_thread() {
start_args->func(start_args->arg));
}

int LLVM_LIBC_ENTRYPOINT(thrd_create)(thrd_t *thread, thrd_start_t func,
void *arg) {
LLVM_LIBC_FUNCTION(int, thrd_create,
(thrd_t * thread, thrd_start_t func, void *arg)) {
unsigned clone_flags =
CLONE_VM // Share the memory space with the parent.
| CLONE_FS // Share the file system with the parent.
Expand Down
2 changes: 1 addition & 1 deletion libc/src/threads/linux/thrd_join.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace __llvm_libc {

int LLVM_LIBC_ENTRYPOINT(thrd_join)(thrd_t *thread, int *retval) {
LLVM_LIBC_FUNCTION(int, thrd_join, (thrd_t * thread, int *retval)) {
FutexData *clear_tid_address =
reinterpret_cast<FutexData *>(thread->__clear_tid);

Expand Down
2 changes: 1 addition & 1 deletion libc/src/time/mktime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static inline time_t outOfRange() {
return static_cast<time_t>(-1);
}

time_t LLVM_LIBC_ENTRYPOINT(mktime)(struct tm *t1) {
LLVM_LIBC_FUNCTION(time_t, mktime, (struct tm * t1)) {
// Unlike most C Library functions, mktime doesn't just die on bad input.
// TODO(rtenneti); Handle leap seconds. Handle out of range time and date
// values that don't overflow or underflow.
Expand Down
2 changes: 1 addition & 1 deletion libc/src/unistd/linux/write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace __llvm_libc {

ssize_t LLVM_LIBC_ENTRYPOINT(write)(int fd, const void *buf, size_t count) {
LLVM_LIBC_FUNCTION(ssize_t, write, (int fd, const void *buf, size_t count)) {
long ret = __llvm_libc::syscall(SYS_write, fd, buf, count);
if (ret < 0) {
llvmlibc_errno = -ret;
Expand Down