diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2020-11-19 20:59:14 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-19 20:59:14 -0800 |
commit | de5e7365957b3eaf0d9aa05eea4ee759efb67ca4 (patch) | |
tree | 397149ae1909c35fa6851a87c289ec5427f647b2 /src/ir/ReFinalize.cpp | |
parent | d0bc3811f00fe90762a9bee19bf354f780704ce5 (diff) | |
download | binaryen-de5e7365957b3eaf0d9aa05eea4ee759efb67ca4.tar.gz binaryen-de5e7365957b3eaf0d9aa05eea4ee759efb67ca4.tar.bz2 binaryen-de5e7365957b3eaf0d9aa05eea4ee759efb67ca4.zip |
[wasm-builder] Construct module elements as unique_ptrs (#3391)
When Functions, Globals, Events, and Exports are added to a module, if they are
not already in std::unique_ptrs, they are wrapped in a new std::unique_ptr owned
by the Module. This adds an extra layer of indirection when accessing those
elements that can be avoided by allocating those elements as std::unique_ptrs.
This PR updates wasm-builder to allocate module elements via std::make_unique
rather than `new`. In the future, we should remove the raw pointer versions of
Module::add* to encourage using std::unique_ptrs more broadly.
Diffstat (limited to 'src/ir/ReFinalize.cpp')
0 files changed, 0 insertions, 0 deletions