ccc: Embrace destiny as a clang compiler driver.

This redoes the default mode that ccc runs in w.r.t. using clang. Now
ccc defaults to always using clang for any task clang can
handle. However, the following options exist to tweak this behavior:

 -ccc-no-clang: Don't use clang at all for compilation (still used for
  static analysis).
 
 -ccc-no-clang-cxx: Don't use clang for C++ and Objective-C++ inputs.

 -ccc-no-clang-cpp: Don't use clang as a preprocessor.

 -ccc-clang-archs <archs>: If present, only use clang for the given
  comma separated list of architectures. This only works on Darwin for
  now.

Note that all -ccc options must be first on the command line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63346 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/ccc/ccclib/Tools.py b/tools/ccc/ccclib/Tools.py
index a24255c..61d6a24 100644
--- a/tools/ccc/ccclib/Tools.py
+++ b/tools/ccc/ccclib/Tools.py
@@ -190,6 +190,9 @@
             cmd_args.append('-emit-llvm-bc')
         elif outputType is Types.AsmTypeNoPP:
             cmd_args.append('-S')
+        elif (inputs[0].type.preprocess and 
+              outputType is inputs[0].type.preprocess):
+            cmd_args.append('-E')
         elif outputType is Types.PCHType:
             # No special option needed, driven by -x. However, we
             # patch the output name to try and not conflict with gcc.