[WebAssembly] Fix reverse mapping in WasmEHFuncInfo

D97247 added the reverse mapping from unwind destination to their
source, but it had a critical bug; sources can be multiple, because
multiple BBs can have a single BB as their unwind destination.

This changes `WasmEHFuncInfo::getUnwindSrc` to `getUnwindSrcs` and makes
it return a vector rather than a single BB. It does not return the const
reference to the existing vector but creates a new vector because
`WasmEHFuncInfo` stores not `BasicBlock*` or `MachineBasicBlock*` but
`PointerUnion` of them. Also I hoped to unify those methods for
`BasicBlock` and `MachineBasicBlock` into one using templates to reduce
duplication, but failed because various usages require `BasicBlock*` to
be `const` but it's hard to make it `const` for `MachineBasicBlock`

Fixes https://github.com/emscripten-core/emscripten/issues/13514.
(More precisely, fixes

Reviewed By: dschuff, tlively

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

GitOrigin-RevId: aa097ef8d474c925e4fbe0efcaad253266c2fd6f
4 files changed