Douglas Gregor | 1f87cf4 | 2011-09-15 20:54:06 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
Douglas Gregor | 953a61f | 2013-02-07 19:01:24 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -F %S/Inputs %s 2>&1 | FileCheck %s |
Douglas Gregor | c13a34b | 2012-01-03 19:32:59 +0000 | [diff] [blame] | 3 | // FIXME: When we have a syntax for modules in C, use that. |
Douglas Gregor | 1b257af | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 4 | @import MutuallyRecursive1; |
Douglas Gregor | 1f87cf4 | 2011-09-15 20:54:06 +0000 | [diff] [blame] | 5 | |
Douglas Gregor | 830ea5b | 2012-11-30 18:38:50 +0000 | [diff] [blame] | 6 | // CHECK: While building module 'MutuallyRecursive1' imported from |
| 7 | // CHECK: While building module 'MutuallyRecursive2' imported from |
Douglas Gregor | 1b257af | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 8 | // CHECK: MutuallyRecursive2.h:3:9: fatal error: cyclic dependency in module 'MutuallyRecursive1': MutuallyRecursive1 -> MutuallyRecursive2 -> MutuallyRecursive1 |
Douglas Gregor | 830ea5b | 2012-11-30 18:38:50 +0000 | [diff] [blame] | 9 | // CHECK: While building module 'MutuallyRecursive1' imported from |
Douglas Gregor | 1b257af | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 10 | // CHECK: MutuallyRecursive1.h:2:9: fatal error: could not build module 'MutuallyRecursive2' |
| 11 | // CHECK: cycles.c:4:9: fatal error: could not build module 'MutuallyRecursive1' |
Douglas Gregor | 830ea5b | 2012-11-30 18:38:50 +0000 | [diff] [blame] | 12 | // CHECK-NOT: error: |
Douglas Gregor | 1f87cf4 | 2011-09-15 20:54:06 +0000 | [diff] [blame] | 13 | |