We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d7d09a commit 5c0e7c9Copy full SHA for 5c0e7c9
llvm/lib/Support/Timer.cpp
@@ -312,8 +312,10 @@ TimerGroup::~TimerGroup() {
312
Next->Prev = Prev;
313
};
314
315
- // If the managed instance is already dead, it means we're in the CRT
316
- // destruction, so no need to lock.
+ // TimerGlobals is always created implicity, through a call to timerLock(),
+ // 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().
319
if (!isTimerGlobalsConstructed()) {
320
unlink();
321
return;
0 commit comments