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