Douglas Gregor | 6aa52ec | 2011-08-26 23:56:07 +0000 | [diff] [blame] | 1 | #ifdef NONEXISTENT |
Douglas Gregor | 65030af | 2011-08-31 18:19:09 +0000 | [diff] [blame] | 2 | __import_module__ load_nonexistent; |
Douglas Gregor | 6aa52ec | 2011-08-26 23:56:07 +0000 | [diff] [blame] | 3 | #endif |
| 4 | |
| 5 | #ifdef FAILURE |
Douglas Gregor | 65030af | 2011-08-31 18:19:09 +0000 | [diff] [blame] | 6 | __import_module__ load_failure; |
Douglas Gregor | 6aa52ec | 2011-08-26 23:56:07 +0000 | [diff] [blame] | 7 | #endif |
| 8 | |
| 9 | // RUN: %clang_cc1 -x c++ -emit-module -o %T/load_failure.pcm %S/Inputs/load_failure.h |
| 10 | // RUN: %clang_cc1 -I %T %s -DNONEXISTENT 2>&1 | FileCheck -check-prefix=CHECK-NONEXISTENT %s |
Douglas Gregor | 65030af | 2011-08-31 18:19:09 +0000 | [diff] [blame] | 11 | // CHECK-NONEXISTENT: load_failure.c:2:19: fatal error: module 'load_nonexistent' not found |
Douglas Gregor | 6aa52ec | 2011-08-26 23:56:07 +0000 | [diff] [blame] | 12 | |
Douglas Gregor | 02a5e87 | 2011-09-10 00:30:18 +0000 | [diff] [blame^] | 13 | // RUN: not %clang_cc1 -I %T %s -DFAILURE 2> %t |
| 14 | // RUN: FileCheck -check-prefix=CHECK-FAILURE %s < %t |
| 15 | |
Douglas Gregor | 6aa52ec | 2011-08-26 23:56:07 +0000 | [diff] [blame] | 16 | // FIXME: Clean up diagnostic text below and give it a location |
| 17 | // CHECK-FAILURE: error: C99 support was disabled in PCH file but is currently enabled |
| 18 | |
| 19 | |