[cfe-dev] Calling a function from Visual Studio dll - name mangling issues

Charles Davis cdavis at mymail.mines.edu
Sun Mar 20 16:30:01 PDT 2011


On 3/20/11 5:23 PM, Óscar Fuentes wrote:
> Daan Nijs <nijs.daan at gmail.com> writes:
> 
>> I'm trying to call a function in a dll compiled with Visual Studio from
>> JITed code. Unfortunately, the mangled name generated by the codegen does
>> not match the one that ends up being exported by the dll. LLVM generates a
>> *nix style mangled name() where it needs the windows mangled named.
> 
> Clang has no support for VC++ name mangling,
Wrong. I wrote the code myself. You can turn it on by passing "-Xclang
-cxx-abi -Xclang microsoft" on the driver command line. It's not
finished yet, though, so some stuff might not work.
> nor for the VC++ C++ ABI in
> general.
True, the rest isn't implemented yet. Because of this, I'm not sure
you'd really want to turn it on just yet.

Chip





More information about the cfe-dev mailing list