Close https://github.com/llvm/llvm-project/issues/59513
Close https://github.com/llvm/llvm-project/issues/110146
As we discussed, this is related to ABI:
https://github.com/itanium-cxx-abi/cxx-abi/issues/186
I was intending to fix this after it gets merged into the ItaniumC++ABI
formally. But it looks like ItaniumC++ABI doesn't update it yet and
there are more issue reports for it.
Luckily Richard had a clear direction guide here though. So I think it
should be good to do this without a formal ItaniumC++ABI wording.
The diff of the patch is slightly larger than it was by a simple
refacoration to simple the control flow a little bit.