2011-08-27 07:56:07 +08:00
|
|
|
#ifdef NONEXISTENT
|
2012-12-12 06:11:52 +08:00
|
|
|
@import load_nonexistent;
|
2011-08-27 07:56:07 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef FAILURE
|
2012-12-12 06:11:52 +08:00
|
|
|
@import load_failure;
|
2011-08-27 07:56:07 +08:00
|
|
|
#endif
|
|
|
|
|
2011-11-16 23:22:03 +08:00
|
|
|
// RUN: rm -rf %t
|
2015-06-16 08:08:24 +08:00
|
|
|
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -fmodules-cache-path=%t -fdisable-module-hash -emit-module -fmodule-name=load_failure %S/Inputs/module.map
|
|
|
|
// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -I %S/Inputs -fdisable-module-hash %s -DNONEXISTENT 2>&1 | FileCheck -check-prefix=CHECK-NONEXISTENT %s
|
2012-12-12 06:11:52 +08:00
|
|
|
// CHECK-NONEXISTENT: load_failure.c:2:9: fatal error: module 'load_nonexistent' not found
|
2011-08-27 07:56:07 +08:00
|
|
|
|
2015-06-16 08:08:24 +08:00
|
|
|
// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -I %S/Inputs -fdisable-module-hash %s -DFAILURE 2> %t.out
|
2011-11-16 23:22:03 +08:00
|
|
|
// RUN: FileCheck -check-prefix=CHECK-FAILURE %s < %t.out
|
2011-09-10 08:30:18 +08:00
|
|
|
|
2011-08-27 07:56:07 +08:00
|
|
|
// FIXME: Clean up diagnostic text below and give it a location
|
2011-09-14 02:26:39 +08:00
|
|
|
// CHECK-FAILURE: error: C99 was disabled in PCH file but is currently enabled
|
2012-01-04 03:32:59 +08:00
|
|
|
// FIXME: When we have a syntax for modules in C, use that.
|
2011-08-27 07:56:07 +08:00
|
|
|
|
|
|
|
|