[pr21886] Change MCJIT/ELF to support MSVC C++ mangled symbol.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 22 Jan 2015 14:20:45 +0000 (14:20 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 22 Jan 2015 14:20:45 +0000 (14:20 +0000)
commit5a67ed1038de11a26851c01e0ae22a67e8ac028c
treef6a5304a61555ec532612fcd4a4bfeb0529f35b4
parent48846ba57023d66bc251b3e6ac03e01700aa382f
[pr21886] Change MCJIT/ELF to support MSVC C++ mangled symbol.

The ELF format is used on Windows by the MCJIT engine. Thus, on Windows, the
ELFObjectWriter can encounter symbols mangled using the MS Visual Studio C++
name mangling. Symbols mangled using the MSVC C++ name mangling can legally
have "@@@" as a substring. The EFLObjectWriter should not interpret the "@@@"
substring as specifying GNU-style symbol versioning. The ELFObjectWriter
therefore check for the MSVC C++ name mangling prefix which is either "?", "@?",
"imp_?" or "imp_?@".

llvm-svn: 226830
llvm/lib/MC/ELFObjectWriter.cpp
llvm/test/MC/ELF/symver-msvc.s [new file with mode: 0644]