EricWF added a comment. LGTM modulo bug fix.
================ Comment at: src/cxa_thread_atexit.cpp:70 @@ +69,3 @@ + while (auto head = dtors) { + dtors = head->next; + head->dtor(head->obj); ---------------- There is a bug here. If `head->next == nullptr` and if `head->dtor(head->obj))` creates a TL variable in the destructor then that destructor will not be invoked. Here's an updated test case which catches the bug: https://gist.github.com/EricWF/3bb50d4f28b91aa28d2adefea0e94a0e https://reviews.llvm.org/D21803 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits