HomePhabricator

[WebAssembly] Move code and data section generation to finalizeContent. NFC.

Description

[WebAssembly] Move code and data section generation to finalizeContent. NFC.

Previously these sections were being generated during their
constructors. This moves the work to finalizeContent, and also does
the same for the relocation sections because their contents depends
on the final layout too.

This change is part of a larger refactor to how we deal with synthetic
sections: https://reviews.llvm.org/D61811

Differential Revision: https://reviews.llvm.org/D61971

Details