forked from OSchip/llvm-project
Avoid crashing if a directory has no pch files.
Should fix some of the bots that have assertions disabled. llvm-svn: 187329
This commit is contained in:
parent
cd61afb4ee
commit
5150f2f558
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue