minix/external/bsd/llvm/dist/clang/test/Modules/fatal-module-loader-error.m
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

26 lines
840 B
Objective-C

// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: touch %t/Module.pcm
// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t %s -fdisable-module-hash -F %S/Inputs -verify
// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t %s -fdisable-module-hash -F %S/Inputs -DIMPLICIT -verify
// This tests that after a fatal module loader error, we do not continue parsing.
#ifdef IMPLICIT
// expected-error@+1{{does not appear to be}}
#import <Module/Module.h>
#pragma clang __debug crash;
#else
// expected-error@+1{{does not appear to be}}
@import Module;
#pragma clang __debug crash;
#endif
// Also check that libclang does not create a PCH with such an error.
// RUN: not c-index-test -write-pch %t.pch -fmodules -fmodules-cache-path=%t \
// RUN: %s -Xclang -fdisable-module-hash -F %S/Inputs 2>&1 | FileCheck %s
// CHECK: Unable to write PCH file