Turn Driver::CCCIsCXX and CCCIsCPP into a single Mode enum,
and add a new option --driver-mode= to control it explicitly.

The CCCIsCXX and CCCIsCPP flags were non-overlapping, i.e. there
are currently really three modes that Clang can run in: gcc, g++
or cpp, so it makes sense to represent them as an enum.

Having a command line flag to control it helps testing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186605 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/lit.cfg b/test/lit.cfg
index 7bc6321..46fc5b5 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -202,9 +202,11 @@
 config.substitutions.append( ('%clang_cc1', '%s -cc1 -internal-isystem %s'
                               % (config.clang,
                                  getClangBuiltinIncludeDir(config.clang))) )
+config.substitutions.append( ('%clang_cpp', ' ' + config.clang +
+                              ' --driver-mode=cpp '))
 
 config.substitutions.append( ('%clangxx', ' ' + config.clang +
-                              ' -ccc-cxx '))
+                              ' --driver-mode=g++ '))
 config.substitutions.append( ('%clang', ' ' + config.clang + ' ') )
 config.substitutions.append( ('%test_debuginfo', ' ' + config.llvm_src_root + '/utils/test_debuginfo.pl ') )
 
@@ -222,6 +224,9 @@
 config.substitutions.append(
     (' %clang-cc1 ',
      """*** invalid substitution, use '%clang_cc1'. ***""") )
+config.substitutions.append(
+    (' %clang-cpp ',
+     """*** invalid substitution, use '%clang_cpp'. ***""") )
 
 ###