[PATCH] D44181: Support resetting STATISTIC() values using llvm::ResetStatistics()
Justin Bogner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 7 11:47:41 PST 2018
bogner added inline comments.
================
Comment at: unittests/ADT/StatisticTest.cpp:26
+ for (const auto &S : Range) {
+ if (std::string(S.first) == "Counter")
+ S1 = S;
----------------
Isn't S.first a StringRef? Why do we need a std::string here for the comparison?
================
Comment at: unittests/ADT/StatisticTest.cpp:152-154
+ // No need to test the output ResetStatistics(), there's nothing to reset so
+ // we can't tell if it failed anyway.
+ ResetStatistics();
----------------
Why bother even calling it if we're not testing anything?
Repository:
rL LLVM
https://reviews.llvm.org/D44181
More information about the llvm-commits
mailing list