[PATCH] D70685: [WebAssembly] Fix the order of destructors in the LowerGlobalDtors pass.

Dan Gohman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 18 08:42:16 PDT 2020


sunfish added a comment.

> The commit description says "not ordered to group destructors with common associated objects" but it looks this patch is doing grouping by associated object. Is that intentional?

It groups adjacent destructors which happen to have the same associated
object, but doesn't order them by the associated object. I've now added a
comment to clarify that.

> Also, maybe there should be a test which has destructors of different priorities associated with the same object?

Test added.

> (also, the langref says that the order within a priority is unspecfied. is something depending on this ordering (I assume so, since you bothered to change it)?

C++ says we need to run the destructors in reverse order from the
corresponding constructors, so we need to match the order.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70685/new/

https://reviews.llvm.org/D70685





More information about the llvm-commits mailing list