aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/MathExtrasTest.cpp
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2015-11-20 10:07:11 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2015-11-20 10:07:11 +0000
commitad6c04de0e76554592b9b6209bf46e980eae07ef (patch)
treea85d501fceb14b8f8a4c52042c1b72c4e0281089 /llvm/unittests/Support/MathExtrasTest.cpp
parent630077ef558317ac85bfc266737040eaecd0bcb0 (diff)
downloadllvm-ad6c04de0e76554592b9b6209bf46e980eae07ef.zip
llvm-ad6c04de0e76554592b9b6209bf46e980eae07ef.tar.gz
llvm-ad6c04de0e76554592b9b6209bf46e980eae07ef.tar.bz2
Revert 253497 and 253539 to try to fix clang-cmake-mips buildbot.
It caused link errors of the form: InstrProfiling.c:(.text.__llvm_profile_instrument_target+0x1c0): undefined reference to `__sync_fetch_and_add_8' We had a network outage at the time of the commit so the first build to show a problem is http://lab.llvm.org:8011/builders/clang-cmake-mips/builds/10827 llvm-svn: 253656
Diffstat (limited to 'llvm/unittests/Support/MathExtrasTest.cpp')
-rw-r--r--llvm/unittests/Support/MathExtrasTest.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/llvm/unittests/Support/MathExtrasTest.cpp b/llvm/unittests/Support/MathExtrasTest.cpp
index 0f38546..8bd47e3 100644
--- a/llvm/unittests/Support/MathExtrasTest.cpp
+++ b/llvm/unittests/Support/MathExtrasTest.cpp
@@ -190,21 +190,4 @@ TEST(MathExtras, RoundUpToAlignment) {
EXPECT_EQ(552u, RoundUpToAlignment(321, 255, 42));
}
-template<typename T>
-void SaturatingAddTestHelper()
-{
- const T Max = std::numeric_limits<T>::max();
- EXPECT_EQ(T(3), SaturatingAdd(T(1), T(2)));
- EXPECT_EQ(Max, SaturatingAdd(Max, T(1)));
- EXPECT_EQ(Max, SaturatingAdd(T(1), Max));
- EXPECT_EQ(Max, SaturatingAdd(Max, Max));
-}
-
-TEST(MathExtras, SaturatingAdd) {
- SaturatingAddTestHelper<uint8_t>();
- SaturatingAddTestHelper<uint16_t>();
- SaturatingAddTestHelper<uint32_t>();
- SaturatingAddTestHelper<uint64_t>();
-}
-
}