summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-04-16 23:10:13 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-04-16 23:10:13 +0000
commitf2df7c283f7f6e2ee59d07794d23d6d030e47fd2 (patch)
treee4e972f76b586854120e4f4410a1885d6fcc207a /clang/lib/Driver/Driver.cpp
parentfec1d086e0e8ce89f9eb4ee0ffc8100e25c195c8 (diff)
downloadbcm5719-llvm-f2df7c283f7f6e2ee59d07794d23d6d030e47fd2.tar.gz
bcm5719-llvm-f2df7c283f7f6e2ee59d07794d23d6d030e47fd2.zip
Driver: Allow using clang as a precompiler, even if it is an
unsupported arch. llvm-svn: 69322
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r--clang/lib/Driver/Driver.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index da590f2bca0..5afcefe68d3 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -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)) {
OpenPOWER on IntegriCloud