[WebAssembly] Stabilize custom section order
authorFangrui Song <i@maskray.me>
Sat, 22 Jul 2023 16:37:22 +0000 (09:37 -0700)
committerFangrui Song <i@maskray.me>
Sat, 22 Jul 2023 16:37:22 +0000 (09:37 -0700)
commit8db61ed29df0776046e64a0bd444f0baa7bc37e9
tree4b3fc6aed7926ee552667f7b4f7a2e6dda163ebc
parent874217f99b99ab3c9026dc3b7bd84cd2beebde6e
[WebAssembly] Stabilize custom section order

It currently depends on the StringMap iteration order, which is not
guaranteed to be deterministic. Use MapVector to stabilize the order.
lld/test/wasm/custom-sections.ll
lld/test/wasm/debug-undefined-fs.s
lld/test/wasm/section-symbol-relocs.yaml
lld/wasm/Writer.cpp