blob: 8b0d202ee8b5c9c0174dfeaf7b6c8b13c980caa8 [file] [log] [blame]
Douglas Gregor6aa52ec2011-08-26 23:56:07 +00001#ifdef NONEXISTENT
Douglas Gregor1b257af2012-12-11 22:11:52 +00002@import load_nonexistent;
Douglas Gregor6aa52ec2011-08-26 23:56:07 +00003#endif
4
5#ifdef FAILURE
Douglas Gregor1b257af2012-12-11 22:11:52 +00006@import load_failure;
Douglas Gregor6aa52ec2011-08-26 23:56:07 +00007#endif
8
Douglas Gregorf8b42d12011-11-16 15:22:03 +00009// RUN: rm -rf %t
Douglas Gregor953a61f2013-02-07 19:01:24 +000010// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodules-cache-path=%t -fdisable-module-hash -emit-module -fmodule-name=load_failure %S/Inputs/module.map
Stephen Hines651f13c2014-04-23 16:59:28 -070011// 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
Douglas Gregor1b257af2012-12-11 22:11:52 +000012// CHECK-NONEXISTENT: load_failure.c:2:9: fatal error: module 'load_nonexistent' not found
Douglas Gregor6aa52ec2011-08-26 23:56:07 +000013
Stephen Hines651f13c2014-04-23 16:59:28 -070014// RUN: not %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -I %S/Inputs -fdisable-module-hash %s -DFAILURE 2> %t.out
Douglas Gregorf8b42d12011-11-16 15:22:03 +000015// RUN: FileCheck -check-prefix=CHECK-FAILURE %s < %t.out
Douglas Gregor02a5e872011-09-10 00:30:18 +000016
Douglas Gregor6aa52ec2011-08-26 23:56:07 +000017// FIXME: Clean up diagnostic text below and give it a location
Douglas Gregor7d5e81b2011-09-13 18:26:39 +000018// CHECK-FAILURE: error: C99 was disabled in PCH file but is currently enabled
Douglas Gregorc13a34b2012-01-03 19:32:59 +000019// FIXME: When we have a syntax for modules in C, use that.
Douglas Gregor6aa52ec2011-08-26 23:56:07 +000020
21