joerg added a comment. Is there any reason why keeping at_exit and __cxa_atexit handling merged? They are pretty much disjunct code paths, especially since the at_exit stack means that the real at_exit can be used. Repository: rL LLVM https://reviews.llvm.org/D39619