[PATCH] MCJIT/ELF should support MSVC C++ mangled symbols

Hi everyone,

We have found a problem while using the MCJIT engine on Windows. Our jitted code is invoking some external C++ functions. These external functions have names that are mangled using the MSVC C++ naming convention. These were not handled properly by the ELObjectWriter.

The attached patch addresses this issue. The patch is against the LLVM release_35 branch (Revision 223459). The patch also includes a regression test.

We have successfully ran all LLVM & Clang regression tests after applying the patch on both Debug+Assert and Release builds.

Regards,
Benoit

350F40DB-4457-4455-A632-0DF05738AF15[6].png