krytarowski added a comment. The behavior of atexit(3) LIFO has been defined in the C standard. I'm going to switch to the internal vector container and add a dedicated test to verify that this is really LIFO. Repository: rL LLVM https://reviews.llvm.org/D39619