[cleanup] Factor out adjusting "cl.exe" to "clang-cl.exe". NFC.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@215754 91177308-0d34-0410-b5e6-96231b3b80d8
[cleanup] Factor out initializing the DianosticOptions. NFC.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@215755 91177308-0d34-0410-b5e6-96231b3b80d8
[cleanup] Factor out setting the driver's install dir. NFC.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@215756 91177308-0d34-0410-b5e6-96231b3b80d8
Add missing matchers to the dynamic registry.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@215757 91177308-0d34-0410-b5e6-96231b3b80d8
[cleanup] Factor out handling CC1 tools. NFC.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@215759 91177308-0d34-0410-b5e6-96231b3b80d8
[cleanup] Range-for'ify this loop. NFC.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@215760 91177308-0d34-0410-b5e6-96231b3b80d8
[cleanup] Rename this function to better reflect its purpose. NFC.

This also suggests some refactoring to simplify this code. Basically, a
ton of complexity in this argument handling code comes from the need to
save const char *'s in stable storage for pushing onto argv.
It seems like llvm::cl::StringSaver can be improved to cover all the
needs here.

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