summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikael Holmen <mikael.holmen@ericsson.com>2019-06-28 06:45:20 +0000
committerMikael Holmen <mikael.holmen@ericsson.com>2019-06-28 06:45:20 +0000
commit2adab5a1426ed0b68e0d1b6f574b200fa12c1b40 (patch)
tree1153af203eb89e601cb1c17629d0fae699430245
parente832adea0fff5957845beff970d9134faf242d11 (diff)
downloadbcm5719-llvm-2adab5a1426ed0b68e0d1b6f574b200fa12c1b40.tar.gz
bcm5719-llvm-2adab5a1426ed0b68e0d1b6f574b200fa12c1b40.zip
Silence gcc warning in testcase [NFC]
Without the fix gcc (7.4.0) complains with ../unittests/ADT/APIntTest.cpp: In member function 'virtual void {anonymous}::APIntTest_MultiplicativeInverseExaustive_Test::TestBody()': ../unittests/ADT/APIntTest.cpp:2510:36: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] for (unsigned Value = 0; Value < (1 << BitWidth); ++Value) { ~~~~~~^~~~~~~~~~~~~~~~~ llvm-svn: 364624
-rw-r--r--llvm/unittests/ADT/APIntTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/ADT/APIntTest.cpp b/llvm/unittests/ADT/APIntTest.cpp
index 0755a8cc667..f5f6594b836 100644
--- a/llvm/unittests/ADT/APIntTest.cpp
+++ b/llvm/unittests/ADT/APIntTest.cpp
@@ -2507,7 +2507,7 @@ TEST(APIntTest, SolveQuadraticEquationWrap) {
TEST(APIntTest, MultiplicativeInverseExaustive) {
for (unsigned BitWidth = 1; BitWidth <= 16; ++BitWidth) {
- for (unsigned Value = 0; Value < (1 << BitWidth); ++Value) {
+ for (unsigned Value = 0; Value < (1u << BitWidth); ++Value) {
APInt V = APInt(BitWidth, Value);
APInt MulInv =
V.zext(BitWidth + 1)
OpenPOWER on IntegriCloud