File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change 17
17
18
18
#include " llvm/Support/Compiler.h"
19
19
#include " llvm/Support/MathExtras.h"
20
+ #include < algorithm>
20
21
#include < cassert>
21
22
#include < climits>
22
23
#include < cstring>
Original file line number Diff line number Diff line change 14
14
#define LLVM_SUPPORT_MATHEXTRAS_H
15
15
16
16
#include " llvm/Support/Compiler.h"
17
- #include < algorithm>
18
17
#include < cassert>
19
18
#include < climits>
20
19
#include < cmath>
@@ -793,7 +792,7 @@ inline int64_t SignExtend64(uint64_t X, unsigned B) {
793
792
// / value of the result.
794
793
template <typename T>
795
794
std::enable_if_t <std::is_unsigned<T>::value, T> AbsoluteDifference (T X, T Y) {
796
- return std::max (X, Y) - std::min (X, Y) ;
795
+ return X > Y ? X - Y : Y - X ;
797
796
}
798
797
799
798
// / Add two unsigned integers, X and Y, of type T. Clamp the result to the
You can’t perform that action at this time.
0 commit comments