Fix unused function warning in StatisticTest.cpp
authorDaniel Sanders <daniel_l_sanders@apple.com>
Thu, 8 Mar 2018 15:52:45 +0000 (15:52 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Thu, 8 Mar 2018 15:52:45 +0000 (15:52 +0000)
llvm-svn: 327015

llvm/unittests/ADT/StatisticTest.cpp

index ae51827..17a5c7f 100644 (file)
@@ -19,6 +19,7 @@ namespace {
 STATISTIC(Counter, "Counts things");
 STATISTIC(Counter2, "Counts other things");
 
+#if LLVM_ENABLE_STATS
 static void
 extractCounters(const std::vector<std::pair<StringRef, unsigned>> &Range,
                 OptionalStatistic &S1, OptionalStatistic &S2) {
@@ -29,6 +30,7 @@ extractCounters(const std::vector<std::pair<StringRef, unsigned>> &Range,
       S2 = S;
   }
 }
+#endif
 
 TEST(StatisticTest, Count) {
   EnableStatistics();