1f4a2713aSLionel Sambuc// RUN: rm -rf %t 2f4a2713aSLionel Sambuc// RUN: mkdir %t 3f4a2713aSLionel Sambuc// RUN: touch %t/Module.pcm 4f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t %s -fdisable-module-hash -F %S/Inputs -verify 5f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t %s -fdisable-module-hash -F %S/Inputs -DIMPLICIT -verify 6f4a2713aSLionel Sambuc 7f4a2713aSLionel Sambuc// This tests that after a fatal module loader error, we do not continue parsing. 8f4a2713aSLionel Sambuc 9f4a2713aSLionel Sambuc#ifdef IMPLICIT 10f4a2713aSLionel Sambuc 11f4a2713aSLionel Sambuc// expected-error@+1{{does not appear to be}} 12f4a2713aSLionel Sambuc#import <Module/Module.h> 13f4a2713aSLionel Sambuc#pragma clang __debug crash; 14f4a2713aSLionel Sambuc 15f4a2713aSLionel Sambuc#else 16f4a2713aSLionel Sambuc 17f4a2713aSLionel Sambuc// expected-error@+1{{does not appear to be}} 18f4a2713aSLionel Sambuc@import Module; 19f4a2713aSLionel Sambuc#pragma clang __debug crash; 20f4a2713aSLionel Sambuc 21f4a2713aSLionel Sambuc#endif 22f4a2713aSLionel Sambuc 23f4a2713aSLionel Sambuc// Also check that libclang does not create a PCH with such an error. 24f4a2713aSLionel Sambuc// RUN: not c-index-test -write-pch %t.pch -fmodules -fmodules-cache-path=%t \ 25f4a2713aSLionel Sambuc// RUN: %s -Xclang -fdisable-module-hash -F %S/Inputs 2>&1 | FileCheck %s 26*0a6a1f1dSLionel Sambuc// CHECK: {{^}}Failure: AST deserialization error occurred{{$}} 27