[libc] Add a resizable container with constexpr constructor and destructor.
authorSiva Chandra Reddy <sivachandra@google.com>
Wed, 9 Mar 2022 20:54:06 +0000 (20:54 +0000)
committerSiva Chandra Reddy <sivachandra@google.com>
Thu, 10 Mar 2022 21:28:23 +0000 (21:28 +0000)
commit19c60980971bc227d94712d4799ded894f9f0f9a
tree88ddfe7c43e77b5be85f1e804fef1f77ed15287d
parent15ef06f453c6f9513b476e80dd9567d01fc662e8
[libc] Add a resizable container with constexpr constructor and destructor.

The new container is used to store atexit callbacks. This way, we avoid
the possibility of the destructor of the container itself getting added
as an at exit callback.

Reviewed By: abrachet

Differential Revision: https://reviews.llvm.org/D121350
libc/src/__support/CPP/CMakeLists.txt
libc/src/__support/CPP/blockstore.h [new file with mode: 0644]
libc/src/stdlib/CMakeLists.txt
libc/src/stdlib/atexit.cpp
libc/src/stdlib/exit.cpp
libc/test/src/__support/CPP/CMakeLists.txt
libc/test/src/__support/CPP/blockstore_test.cpp [new file with mode: 0644]