[libcxx] Remove empty ~__no_destroy
Primary motivation is that after #84651 msan will complain if fields accessed after ~__no_destroy. Previously msan assumed that __obj_ will have own destructor, were we will poison the field, but it never happened before. After #84651 msan will complain on any field access after `~__no_destroy`. As is Msan does validate fields destruction order for classes with trivial destructor. Additionally empty destructor will register __cxa_atexit with -O0. https://gcc.godbolt.org/z/hce587b65 We can not remove the destructor with union where _Tp can have non-trivial destructor. But we can remove destructor if we use in-place new instead of union. https://gcc.godbolt.org/z/Yqxx57eEd - empty even with -O0. Reviewers: #reviewers-libcxx Pull Request: https://github.com/llvm/llvm-project/pull/89882
parent
fefac5d5
Please register or sign in to comment