]> granicus.if.org Git - clang/commit
Adds a way for tools to deduce the target config from a compiler name.
authorManuel Klimek <klimek@google.com>
Tue, 6 Oct 2015 10:45:03 +0000 (10:45 +0000)
committerManuel Klimek <klimek@google.com>
Tue, 6 Oct 2015 10:45:03 +0000 (10:45 +0000)
commit0d0de1222f5a3de9a8c3a85a71c3d7f06f7fa062
tree03685ac92a6df51a84361e0ce64d74cfb5318dbe
parentfad8a5cf2c6fe44b4f115952040f9dfdd23016da
Adds a way for tools to deduce the target config from a compiler name.

Adds `addTargetAndModeForProgramName`, a utility function that will add
appropriate `-target foo` and `--driver-mode=g++` tokens to a command
line for driver invocations of the form `a/b/foo-g++`. It is intended to
support tooling: for example, should a compilation database record some
invocation of `foo-g++` without these implicit flags, a Clang tool may
use this function to add them back.

Patch by Luke Zarko.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249391 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Tooling/Tooling.h
lib/Tooling/Tooling.cpp
unittests/Tooling/CMakeLists.txt
unittests/Tooling/ToolingTest.cpp