2013-05-24 13:44:08 +08:00
|
|
|
// RUN: rm -rf %t
|
|
|
|
// RUN: mkdir %t
|
|
|
|
// RUN: touch %t/Module.pcm
|
2015-06-16 08:08:24 +08:00
|
|
|
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t %s -fdisable-module-hash -F %S/Inputs -verify
|
|
|
|
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t %s -fdisable-module-hash -F %S/Inputs -DIMPLICIT -verify
|
2013-05-24 13:44:08 +08:00
|
|
|
|
|
|
|
// This tests that after a fatal module loader error, we do not continue parsing.
|
|
|
|
|
|
|
|
#ifdef IMPLICIT
|
|
|
|
|
2015-08-09 16:48:41 +08:00
|
|
|
// expected-error@+1{{Module.pcm' is not a valid precompiled module file}}
|
2013-05-24 13:44:08 +08:00
|
|
|
#import <Module/Module.h>
|
|
|
|
#pragma clang __debug crash;
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
2015-08-09 16:48:41 +08:00
|
|
|
// expected-error@+1{{Module.pcm' is not a valid precompiled module file}}
|
2013-05-24 13:44:08 +08:00
|
|
|
@import Module;
|
|
|
|
#pragma clang __debug crash;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Also check that libclang does not create a PCH with such an error.
|
2015-06-16 08:08:24 +08:00
|
|
|
// RUN: not c-index-test -write-pch %t.pch -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \
|
2013-07-05 00:16:58 +08:00
|
|
|
// RUN: %s -Xclang -fdisable-module-hash -F %S/Inputs 2>&1 | FileCheck %s
|
2014-02-13 03:12:37 +08:00
|
|
|
// CHECK: {{^}}Failure: AST deserialization error occurred{{$}}
|