This allows for storage instances to store data that isn't uniqued in the context, or contain otherwise non-trivial logic, in the rare situations that they occur. Storage instances with trivial destructors will still have their destructor skipped. A consequence of this is that the storage instance definition must be visible from the place that registers the type.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Event Timeline
Comment Actions
A consequence of this is that the storage instance definition must be visible from the place that registers the type.
This is worth putting in the documentation.
I wonder if there is an easy way to test a destructor actually being called. An idea that comes to bind is to report_fatal_error in it and have a death unit test, but that sounds hacky and expensive.
clang-format: please reformat the code