[clang] 85ff35a - [HIP] remove overloaded abs in header
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 1 09:26:51 PDT 2021
Author: Yaxun (Sam) Liu
Date: 2021-04-01T12:23:29-04:00
New Revision: 85ff35a9529a1ea9ed7ab8cda10761d66705d518
URL: https://github.com/llvm/llvm-project/commit/85ff35a9529a1ea9ed7ab8cda10761d66705d518
DIFF: https://github.com/llvm/llvm-project/commit/85ff35a9529a1ea9ed7ab8cda10761d66705d518.diff
LOG: [HIP] remove overloaded abs in header
This function seems to be introduced by accident by
https://github.com/llvm/llvm-project/commit/aa2b593f1495a972a4a592952760ec9d5f7c01f1
Such overloaded abs function did not exist before
the refactoring, and does not exist in
https://github.com/llvm/llvm-project/blob/main/clang/lib/Headers/__clang_cuda_cmath.h
Conceptually it also does not make sense, since it adds something like
double abs(int x) {
return ::abs((double)x);
}
It caused regressions in CuPy.
Reviewed by: Aaron Enye Shi, Artem Belevich
Differential Revision: https://reviews.llvm.org/D99738
Added:
Modified:
clang/lib/Headers/__clang_hip_cmath.h
Removed:
################################################################################
diff --git a/clang/lib/Headers/__clang_hip_cmath.h b/clang/lib/Headers/__clang_hip_cmath.h
index cd22a2df954bc..18871e63bfa0f 100644
--- a/clang/lib/Headers/__clang_hip_cmath.h
+++ b/clang/lib/Headers/__clang_hip_cmath.h
@@ -312,7 +312,6 @@ class __promote : public __promote_imp<_A1, _A2, _A3> {};
}
#endif
-__HIP_OVERLOAD1(double, abs)
__HIP_OVERLOAD1(double, acos)
__HIP_OVERLOAD1(double, acosh)
__HIP_OVERLOAD1(double, asin)
More information about the cfe-commits
mailing list