[llvm] [DebugCounter] Add support for non-continous ranges. (PR #89470)

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 12:47:32 PDT 2024


================
@@ -77,18 +90,28 @@ class DebugCounter {
     auto Result = Us.Counters.find(CounterName);
     if (Result != Us.Counters.end()) {
       auto &CounterInfo = Result->second;
-      ++CounterInfo.Count;
+      int64_t CurrCount = CounterInfo.Count++;
----------------
nhaehnle wrote:

Not your change, but wow, that function is large, and its main body (below the initial isCountingEnabled check) should really go into an Impl method that is defined in the .cpp file.

https://github.com/llvm/llvm-project/pull/89470


More information about the llvm-commits mailing list