]> granicus.if.org Git - clang/commitdiff
Driver: Allow using clang as a precompiler, even if it is an
authorDaniel Dunbar <daniel@zuster.org>
Thu, 16 Apr 2009 23:10:13 +0000 (23:10 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 16 Apr 2009 23:10:13 +0000 (23:10 +0000)
unsupported arch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69322 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Driver.cpp

index da590f2bca080b331cf369ec4ca7a3111593a423..5afcefe68d32e0890fdbc64e5a45167bdac9058d 100644 (file)
@@ -1187,6 +1187,12 @@ bool Driver::ShouldUseClangCompiler(const Compilation &C, const JobAction &JA,
     return false;
   }
 
+  // Always use clang for precompiling, regardless of archs. PTH is
+  // platform independent, and this allows the use of the static
+  // analyzer on platforms we don't have full IRgen support for.
+  if (isa<PrecompileJobAction>(JA))
+    return true;
+
   // Finally, don't use clang if this isn't one of the user specified
   // archs to build.
   if (!CCCClangArchs.empty() && !CCCClangArchs.count(ArchName)) {