Skip to content

Commit 5c0e7c9

Browse files
committed
Clarify comment.
1 parent 5d7d09a commit 5c0e7c9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/lib/Support/Timer.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,10 @@ TimerGroup::~TimerGroup() {
312312
Next->Prev = Prev;
313313
};
314314

315-
// If the managed instance is already dead, it means we're in the CRT
316-
// destruction, so no need to lock.
315+
// TimerGlobals is always created implicity, through a call to timerLock(),
316+
// when a TimeGroup is created. On CRT shutdown, the TimerGlobals instance
317+
// might have been destroyed already. Avoid re-creating it if calling
318+
// timerLock().
317319
if (!isTimerGlobalsConstructed()) {
318320
unlink();
319321
return;

0 commit comments

Comments
 (0)