blob: bc0b42631598d976bf0e06e922b3a0e1eb919774 [file] [log] [blame]
Douglas Gregor6aa52ec2011-08-26 23:56:07 +00001#ifdef NONEXISTENT
Douglas Gregorc13a34b2012-01-03 19:32:59 +00002@import load_nonexistent;
Douglas Gregor6aa52ec2011-08-26 23:56:07 +00003#endif
4
5#ifdef FAILURE
Douglas Gregorc13a34b2012-01-03 19:32:59 +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 Gregorc13a34b2012-01-03 19:32:59 +000010// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodule-cache-path %t -fdisable-module-hash -emit-module -fmodule-name=load_failure %S/Inputs/module.map
11// RUN: %clang_cc1 -fmodules -x objective-c -fmodule-cache-path %t -fdisable-module-hash %s -DNONEXISTENT 2>&1 | FileCheck -check-prefix=CHECK-NONEXISTENT %s
12// CHECK-NONEXISTENT: load_failure.c:2:9: fatal error: module 'load_nonexistent' not found
Douglas Gregor6aa52ec2011-08-26 23:56:07 +000013
Douglas Gregorc13a34b2012-01-03 19:32:59 +000014// RUN: not %clang_cc1 -fmodules -x objective-c -fmodule-cache-path %t -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