]> granicus.if.org Git - clang/commit
[Driver] Set the default driver mode based on the executable.
authorZachary Turner <zturner@google.com>
Fri, 12 Aug 2016 17:47:52 +0000 (17:47 +0000)
committerZachary Turner <zturner@google.com>
Fri, 12 Aug 2016 17:47:52 +0000 (17:47 +0000)
commita933c0f589f8d620346b9c9fe77f764d24479121
treebd29b83580982f6fa8e5555aa376461322d33dd9
parent493732fcb2c0ef4514f281727c5166f926d1bcd7
[Driver] Set the default driver mode based on the executable.

Currently, if --driver-mode is not passed at all, it will default
to GCC style driver.  This is never an issue for clang because
it manually constructs a --driver-mode option and passes it.

However, we should still try to do as good as we can even if no
--driver-mode is passed.  LibTooling, for example, does not pass
a --driver-mode option and while it could, it seems like we should
still fallback to the best possible default we can.

This is one of two steps necessary to get clang-tidy working on Windows.

Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D23454

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278535 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Driver/Driver.h
lib/Driver/Driver.cpp
unittests/Driver/ToolChainTest.cpp