summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Frontend/FrontendAction.cpp2
-rw-r--r--clang/test/PCH/badpch.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index 60e615674fa..075fe93d584 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/lib/Frontend/FrontendAction.cpp
@@ -455,6 +455,8 @@ bool FrontendAction::shouldEraseOutputFiles() {
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.
diff --git a/clang/test/PCH/badpch.c b/clang/test/PCH/badpch.c
index 35e9c6ec852..c302329aaae 100644
--- a/clang/test/PCH/badpch.c
+++ b/clang/test/PCH/badpch.c
@@ -1,5 +1,5 @@
// RUN: not %clang_cc1 -fsyntax-only -include-pch %S/Inputs/badpch-empty.h.gch %s 2>&1 | FileCheck -check-prefix=CHECK-EMPTY %s
-// RUN: not --crash %clang_cc1 -fsyntax-only -include-pch %S/Inputs/badpch-dir.h.gch %s 2>&1 | FileCheck -check-prefix=CHECK-DIR %s
+// RUN: not %clang_cc1 -fsyntax-only -include-pch %S/Inputs/badpch-dir.h.gch %s 2>&1 | FileCheck -check-prefix=CHECK-DIR %s
// The purpose of this test is to verify that various invalid PCH files are
// reported as such.
OpenPOWER on IntegriCloud