xref: /minix3/external/bsd/llvm/dist/clang/test/Modules/load_failure.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc #ifdef NONEXISTENT
2f4a2713aSLionel Sambuc @import load_nonexistent;
3f4a2713aSLionel Sambuc #endif
4f4a2713aSLionel Sambuc 
5f4a2713aSLionel Sambuc #ifdef FAILURE
6f4a2713aSLionel Sambuc @import load_failure;
7f4a2713aSLionel Sambuc #endif
8f4a2713aSLionel Sambuc 
9f4a2713aSLionel Sambuc // RUN: rm -rf %t
10f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fmodules -x objective-c++ -fmodules-cache-path=%t -fdisable-module-hash -emit-module -fmodule-name=load_failure %S/Inputs/module.map
11*0a6a1f1dSLionel Sambuc // RUN: not %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -I %S/Inputs -fdisable-module-hash %s -DNONEXISTENT 2>&1 | FileCheck -check-prefix=CHECK-NONEXISTENT %s
12f4a2713aSLionel Sambuc // CHECK-NONEXISTENT: load_failure.c:2:9: fatal error: module 'load_nonexistent' not found
13f4a2713aSLionel Sambuc 
14*0a6a1f1dSLionel Sambuc // RUN: not %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -I %S/Inputs -fdisable-module-hash %s -DFAILURE 2> %t.out
15f4a2713aSLionel Sambuc // RUN: FileCheck -check-prefix=CHECK-FAILURE %s < %t.out
16f4a2713aSLionel Sambuc 
17f4a2713aSLionel Sambuc // FIXME: Clean up diagnostic text below and give it a location
18f4a2713aSLionel Sambuc // CHECK-FAILURE: error: C99 was disabled in PCH file but is currently enabled
19f4a2713aSLionel Sambuc // FIXME: When we have a syntax for modules in C, use that.
20f4a2713aSLionel Sambuc 
21f4a2713aSLionel Sambuc 
22