aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/Timer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Support/Timer.cpp b/llvm/lib/Support/Timer.cpp
index 4dbc8ed..fd587fb 100644
--- a/llvm/lib/Support/Timer.cpp
+++ b/llvm/lib/Support/Timer.cpp
@@ -378,6 +378,8 @@ void TimerGroup::printJSONValue(raw_ostream &OS, const PrintRecord &R,
}
const char *TimerGroup::printJSONValues(raw_ostream &OS, const char *delim) {
+ sys::SmartScopedLock<true> L(*TimerLock);
+
prepareToPrintList();
for (const PrintRecord &R : TimersToPrint) {
OS << delim;