OSDN Git Service

Re-land r332230 "[llvm-exegesis]Fix a warning in r332221"
authorClement Courbet <courbet@google.com>
Mon, 14 May 2018 12:00:35 +0000 (12:00 +0000)
committerClement Courbet <courbet@google.com>
Mon, 14 May 2018 12:00:35 +0000 (12:00 +0000)
comparison of integers of different signs: 'const unsigned long' and 'const int' [-Werror,-Wsign-compare]

unittests/tools/llvm-exegesis/BenchmarkResultTest.cpp:60:5: note: in instantiation of function template specialization 'testing::internal::EqHelper<false>::Compare<unsigned long, int>' requested here
    ASSERT_EQ(FromDiskVector.size(), 1);

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332235 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/tools/llvm-exegesis/BenchmarkResultTest.cpp

index 82c9481..52bc0e9 100644 (file)
@@ -57,7 +57,7 @@ TEST(BenchmarkResultTest, WriteToAndReadFromDisk) {
   {
     // Vector version.
     const auto FromDiskVector = InstructionBenchmark::readYamlsOrDie(Filename);
-    ASSERT_EQ(FromDiskVector.size(), 1);
+    ASSERT_EQ(FromDiskVector.size(), size_t{1});
     const auto FromDisk = FromDiskVector[0];
     EXPECT_EQ(FromDisk.AsmTmpl.Name, ToDisk.AsmTmpl.Name);
     EXPECT_EQ(FromDisk.CpuName, ToDisk.CpuName);