diff options
Diffstat (limited to 'llvm/lib/Support/Statistic.cpp')
-rw-r--r-- | llvm/lib/Support/Statistic.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Support/Statistic.cpp b/llvm/lib/Support/Statistic.cpp index 67b07162b9a..1985409f35c 100644 --- a/llvm/lib/Support/Statistic.cpp +++ b/llvm/lib/Support/Statistic.cpp @@ -166,6 +166,7 @@ void llvm::PrintStatistics(raw_ostream &OS) { } void llvm::PrintStatisticsJSON(raw_ostream &OS) { + sys::SmartScopedLock<true> Reader(*StatLock); StatisticInfo &Stats = *StatInfo; Stats.sort(); @@ -192,6 +193,7 @@ void llvm::PrintStatisticsJSON(raw_ostream &OS) { void llvm::PrintStatistics() { #if LLVM_ENABLE_STATS + sys::SmartScopedLock<true> Reader(*StatLock); StatisticInfo &Stats = *StatInfo; // Statistics not enabled? |