As reported here: https://reviews.llvm.org/D69825#1916865 and in PR45164, in case of a compiler crash, Clang now reports a second crash related to TimerGroups. The crash is caused by the TimerGroup's internal linked list which still points to already freed stack frames, which were unwind by longjmp() (or SEH on Windows) after the first compiler crash.
There's a second crash, not seen in PR45164, which happens when llvm_shutdown is called: the static DefaultTimerGroup object is destroyed which causes more iterating through the TimerGroups.
With this patch, we now 'steal' the TimeGroup instance from DefaultTimerGroup and prevent any further iteration of the timers after the initial crash.