[modules] If a referenced-but-not-instantiated class template specialization
gets explicitly specialized, don't reuse the previous class template
specialization declaration as a new declaration. The benefit here is fairly
marginal, it harms source fidelity, and this is horrible to model if the
specialization was imported from another module (without this change, it
asserts or worse).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209552 91177308-0d34-0410-b5e6-96231b3b80d8
Use comdats to avoid double initialization of weak data

Initializers of global data that can appear multiple TUs (static data
members of class templates or __declspec(selectany) data) are now in a
comdat group keyed on the global variable being initialized.  On
non-Windows platforms, this is a code size and startup time
optimization.  On Windows, this is necessary for ABI compatibility with
MSVC.

Fixes PR16959.

Reviewers: rsmith

Differential Revision: http://reviews.llvm.org/D3811

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209555 91177308-0d34-0410-b5e6-96231b3b80d8
XFAIL test which is breaking some of the build bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209556 91177308-0d34-0410-b5e6-96231b3b80d8
Recompute the injected class name type for a class template specialization
rather than saving and restoring it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209557 91177308-0d34-0410-b5e6-96231b3b80d8
Remove test while I investigate why the test is breaking the bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209558 91177308-0d34-0410-b5e6-96231b3b80d8