ccc: Darwin/x86: Add direct cpp support.
 - Add Darwin_X86_CC1Tool which is shared by Darwin/x86/Compile and
   Darwin/x86/Preprocess tools.

 - Minor bug fixes (CmpDriver exit code, -x cpp-output handling, some
   linker argument translation).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62551 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/ccc/ccclib/Driver.py b/tools/ccc/ccclib/Driver.py
index e8d2d3d..e52640e 100644
--- a/tools/ccc/ccclib/Driver.py
+++ b/tools/ccc/ccclib/Driver.py
@@ -662,6 +662,7 @@
                 not hasSaveTemps and
                 tool.hasIntegratedCPP()):
                 if (len(phase.inputs) == 1 and 
+                    isinstance(phase.inputs[0], Phases.JobAction) and
                     isinstance(phase.inputs[0].phase, Phases.PreprocessPhase)):
                     useIntegratedCPP = True
                     inputList = phase.inputs[0].inputs