Centralize the logic for using the integrated assembler.

llvm-svn: 177360
diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
index e5ddfd1..5322a6d 100644
--- a/clang/lib/Driver/ToolChain.cpp
+++ b/clang/lib/Driver/ToolChain.cpp
@@ -76,6 +76,8 @@
 
   if (getDriver().ShouldUseClangCompiler(JA))
     T = new tools::Clang(*this);
+  else if (Key == Action::AssembleJobClass && useIntegratedAs())
+    T = new tools::ClangAs(*this);
   else
     T = constructTool(Key);