blob: d16bba7628b19740384e5dab8dd9dd7040bde7df [file] [log] [blame]
Douglas Gregor6aa52ec2011-08-26 23:56:07 +00001#ifdef NONEXISTENT
Douglas Gregor65030af2011-08-31 18:19:09 +00002__import_module__ load_nonexistent;
Douglas Gregor6aa52ec2011-08-26 23:56:07 +00003#endif
4
5#ifdef FAILURE
Douglas Gregor65030af2011-08-31 18:19:09 +00006__import_module__ load_failure;
Douglas Gregor6aa52ec2011-08-26 23:56:07 +00007#endif
8
9// RUN: %clang_cc1 -x c++ -emit-module -o %T/load_failure.pcm %S/Inputs/load_failure.h
Douglas Gregor6e975c42011-09-13 23:15:45 +000010// RUN: %clang_cc1 -fmodule-cache-path %T -fdisable-module-hash %s -DNONEXISTENT 2>&1 | FileCheck -check-prefix=CHECK-NONEXISTENT %s
Douglas Gregor65030af2011-08-31 18:19:09 +000011// CHECK-NONEXISTENT: load_failure.c:2:19: fatal error: module 'load_nonexistent' not found
Douglas Gregor6aa52ec2011-08-26 23:56:07 +000012
Douglas Gregor6e975c42011-09-13 23:15:45 +000013// RUN: not %clang_cc1 -fmodule-cache-path %T -fdisable-module-hash %s -DFAILURE 2> %t
Douglas Gregor02a5e872011-09-10 00:30:18 +000014// RUN: FileCheck -check-prefix=CHECK-FAILURE %s < %t
15
Douglas Gregor6aa52ec2011-08-26 23:56:07 +000016// FIXME: Clean up diagnostic text below and give it a location
Douglas Gregor7d5e81b2011-09-13 18:26:39 +000017// CHECK-FAILURE: error: C99 was disabled in PCH file but is currently enabled
Douglas Gregor6aa52ec2011-08-26 23:56:07 +000018
19