Merge pull request #16430 from mppf/deinit-order-module-scope-vars
Deinit module-scope variables in reverse init order
This PR adjusts
insertGlobalAutoDestroyCalls to consider the
initialization order of the module-scope variables being destroyed in the
module deinit function. It destroys these variables in reverse
initialization order rather than reverse declaration order.
(Initialization order will match declaration order unless split-init is
Reviewed by @vasslitvinov - thanks!
- [x] primers pass with valgrind+verify and do not leak
- [x] full local futures testing