Driver: Allow using clang as a precompiler, even if it is an
unsupported arch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69322 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index da590f2..5afcefe 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -1187,6 +1187,12 @@
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)) {