Avoid crashing if a directory has no pch files.
Should fix some of the bots that have assertions disabled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187329 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/FrontendAction.cpp b/lib/Frontend/FrontendAction.cpp
index 60e6156..075fe93 100644
--- a/lib/Frontend/FrontendAction.cpp
+++ b/lib/Frontend/FrontendAction.cpp
@@ -455,6 +455,8 @@
void ASTFrontendAction::ExecuteAction() {
CompilerInstance &CI = getCompilerInstance();
+ if (!CI.hasPreprocessor())
+ return;
// FIXME: Move the truncation aspect of this into Sema, we delayed this till
// here so the source manager would be initialized.