[COFF] Don't try to emit weak aliases on COFF
This comes up when a derived class destructor is equivalent to a base
class destructor defined in the same TU, and we try to alias them.
A COFF weak alias cannot satisfy a normal undefined symbol reference
from another TU. The other TU must also mark the referenced symbol as
weak, and we can't rely on that.
Clang already has a special case here for dllexport, but we failed to
realize that the problem also applies to other non-discardable symbols
such as those from explicit template instantiations.
Fixes PR25477.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@252659
91177308-0d34-0410-b5e6-
96231b3b80d8