@ibuclaw 
>The correct way you would return the mangle for C, Pascal, stdcall (if needed) would be to leave it to the backend to do. This is the point of the Target structure afterall... to get information from the back-end whilst the front-end is still running it's analysis/semantic pass, not to use it to carry out target-specific tasks in the front-end.

I don't care where you put the code, but the mangling needs to be available to the frontend.  This is not going to happen with the digital mars backend (we would need to convert everything to backend format symbols to get C++ mangling), so doing ALL the mangling in the frontend is correct.  This has the added advantage that we can do the mangling on the nice D ast types.

>`char *Target::mangle (const char *name, char link);`

This is not anywhere near enough information to mangle a C++ declaration, so I assume you are proposing different APIs for different mangling schemes.  What is the point of that?

Unless we remove or redefine `.mangleof`, the mangled name needs to be available to semantic.  Beyond this it is an implementation issue how this happens.  I think following the way D and C++ (on every platform except windows) mangling is done is the most logical path here.