ccc: Use toolChain arch name instead of looking for arch command line
argument; the toolchain should always know the arch.
 - Fixes: <rdar://problem/6582911> -ccc-clang-archs doesn't work for excluding ppc


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65104 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/ccc/ccclib/ToolChain.py b/tools/ccc/ccclib/ToolChain.py
index 2fe482e..aa1646a 100644
--- a/tools/ccc/ccclib/ToolChain.py
+++ b/tools/ccc/ccclib/ToolChain.py
@@ -74,6 +74,12 @@
         if self.driver.cccNoClangCXX:
             if action.inputs[0].type in Types.cxxTypesSet:
                 return False
+        
+        # Don't use clang if this isn't one of the user specified
+        # archs to build.
+        if (self.driver.cccClangArchs and 
+            self.archName not in self.driver.cccClangArchs):
+            return False
 
         return True
         
@@ -131,18 +137,6 @@
         major,minor,minorminor = self.darwinVersion
         return '%d.%d.%d' % (10, major-4, minor)
 
-    def shouldUseClangCompiler(self, action):
-        if not super(Darwin_X86_ToolChain, self).shouldUseClangCompiler(action):
-            return False
-        
-        # Only use clang if user didn't override archs, or this is one
-        # of the ones they provided.
-        if (not self.driver.cccClangArchs or 
-            self.archName in self.driver.cccClangArchs):
-            return True
-        
-        return False
-
     def selectTool(self, action):
         assert isinstance(action, Phases.JobAction)