diff --git a/unittests/ADT/StatisticTest.cpp b/unittests/ADT/StatisticTest.cpp index ae5182772700..17a5c7fc204a 100644 --- a/unittests/ADT/StatisticTest.cpp +++ b/unittests/ADT/StatisticTest.cpp @@ -19,6 +19,7 @@ namespace { STATISTIC(Counter, "Counts things"); STATISTIC(Counter2, "Counts other things"); +#if LLVM_ENABLE_STATS static void extractCounters(const std::vector> &Range, OptionalStatistic &S1, OptionalStatistic &S2) { @@ -29,6 +30,7 @@ extractCounters(const std::vector> &Range, S2 = S; } } +#endif TEST(StatisticTest, Count) { EnableStatistics();