This caused a -Wunused-variable warning in a without-assert+with-stats
build (because the stats were included but their use was not).
Stat use is meant to be gated by LLVM_ENABLE_STATS which can be set
independently of assertions.
assert(UniquePath.back() == From && "broken path");
}
-#ifndef NDEBUG
+#if LLVM_ENABLE_STATS
if (NumPaths == 1) {
if (ReachableViaUniquePaths.insert({From, ToFRange->StartAddress}).second)
TailCallUniReachable++;
#include "PerfReader.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/Statistic.h"
#include <unordered_map>
#include <unordered_set>
uint32_t CurSearchingDepth = 0;
-#ifndef NDEBUG
+#if LLVM_ENABLE_STATS
DenseSet<std::pair<uint64_t, uint64_t>> ReachableViaUniquePaths;
DenseSet<std::pair<uint64_t, uint64_t>> Unreachables;
DenseSet<std::pair<uint64_t, uint64_t>> ReachableViaMultiPaths;