[lld][WebAssembly] Delay creation of internal __wasm_memory_init function
authorSam Clegg <sbc@chromium.org>
Thu, 10 Dec 2020 15:40:48 +0000 (07:40 -0800)
committerSam Clegg <sbc@chromium.org>
Thu, 10 Dec 2020 18:47:18 +0000 (10:47 -0800)
commit199497086e46804084e4b8841b39e3604c678f34
tree1593c09b2c227a608849f69beab335c37267f4ec
parent47e7ecdd7d36ca0924aa89c0fb2d956a6345a8f5
[lld][WebAssembly] Delay creation of internal __wasm_memory_init function

This also allows for its creation to be conditional so it is completely
elided when not needed.

Differential Revision: https://reviews.llvm.org/D93035
lld/test/wasm/data-segment-merging.ll
lld/test/wasm/data-segments.ll
lld/test/wasm/no-tls.s
lld/test/wasm/tls.s
lld/wasm/Driver.cpp
lld/wasm/MarkLive.cpp
lld/wasm/SyntheticSections.h
lld/wasm/Writer.cpp