Don't emit strong vtable definitions for imported classes with key functions (PR21355)

Clang would previously assert on the following code when targeting MinGW:

  struct __declspec(dllimport) S {
      virtual ~S();
  };
  S::~S() {}

Because ~S is a key function and the class is dllimport, we would try to emit a
strong definition of the vtable, with dllimport - which is a conflict. We
should not emit strong vtable definitions for imported classes.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220532 91177308-0d34-0410-b5e6-96231b3b80d8
Add a new -fmerge-functions -cc1 flag that enables function merging.


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

This is a very basic toolchain.  It supports cross-compiling Windows (primarily
inspired by the WoA target).  It is meant to use clang with the LLVM IAS and a
binutils ld-compatible interface for the linker (eventually to be lld).  It does
not perform any "standard" GCC lookup, nor does it perform any special
adjustments given that it is expected to be used in an environment where the
user is using MSVCRT (and as such Visual Studio headers) and the Windows SDK.
The primary runtime library is expected to be compiler-rt and the C++
implementation to be libc++.

It also expects that a sysroot has been setup given the usual Unix semantics
(standard C headers in /usr/include, all the import libraries available in
/usr/lib).  It also expects that an entry point stub is present in /usr/lib
(crtbegin.obj for executables, crtbeginS.obj for shared libraries).

The entry point stub is responsible for running any GNU constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220546 91177308-0d34-0410-b5e6-96231b3b80d8
Driver: add missed file from previous commit

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220547 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] clangRewrite: Roll back clangAST in libdeps, due to clang::Stmt::printPretty().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220549 91177308-0d34-0410-b5e6-96231b3b80d8
Merge branch 'master', remote-tracking branch 'trunk/master'