[cfe-commits] r139838 - in /cfe/trunk/test/Modules: Inputs/MutuallyRecursive1.framework/ Inputs/MutuallyRecursive1.framework/Headers/ Inputs/MutuallyRecursive1.framework/Headers/MutuallyRecursive1.h Inputs/MutuallyRecursive2.framework/ Inputs/MutuallyRecursive2.framework/Headers/ Inputs/MutuallyRecursive2.framework/Headers/MutuallyRecursive2.h cycles.c

Douglas Gregor dgregor at apple.com
Thu Sep 15 13:54:06 PDT 2011


Author: dgregor
Date: Thu Sep 15 15:54:06 2011
New Revision: 139838

URL: http://llvm.org/viewvc/llvm-project?rev=139838&view=rev
Log:
Add test case for mutually recursive modules

Added:
    cfe/trunk/test/Modules/Inputs/MutuallyRecursive1.framework/
    cfe/trunk/test/Modules/Inputs/MutuallyRecursive1.framework/Headers/
    cfe/trunk/test/Modules/Inputs/MutuallyRecursive1.framework/Headers/MutuallyRecursive1.h
    cfe/trunk/test/Modules/Inputs/MutuallyRecursive2.framework/
    cfe/trunk/test/Modules/Inputs/MutuallyRecursive2.framework/Headers/
    cfe/trunk/test/Modules/Inputs/MutuallyRecursive2.framework/Headers/MutuallyRecursive2.h
    cfe/trunk/test/Modules/cycles.c

Added: cfe/trunk/test/Modules/Inputs/MutuallyRecursive1.framework/Headers/MutuallyRecursive1.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/MutuallyRecursive1.framework/Headers/MutuallyRecursive1.h?rev=139838&view=auto
==============================================================================
--- cfe/trunk/test/Modules/Inputs/MutuallyRecursive1.framework/Headers/MutuallyRecursive1.h (added)
+++ cfe/trunk/test/Modules/Inputs/MutuallyRecursive1.framework/Headers/MutuallyRecursive1.h Thu Sep 15 15:54:06 2011
@@ -0,0 +1,3 @@
+
+__import_module__ MutuallyRecursive2;
+

Added: cfe/trunk/test/Modules/Inputs/MutuallyRecursive2.framework/Headers/MutuallyRecursive2.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/MutuallyRecursive2.framework/Headers/MutuallyRecursive2.h?rev=139838&view=auto
==============================================================================
--- cfe/trunk/test/Modules/Inputs/MutuallyRecursive2.framework/Headers/MutuallyRecursive2.h (added)
+++ cfe/trunk/test/Modules/Inputs/MutuallyRecursive2.framework/Headers/MutuallyRecursive2.h Thu Sep 15 15:54:06 2011
@@ -0,0 +1,6 @@
+
+
+__import_module__ MutuallyRecursive1;
+
+
+

Added: cfe/trunk/test/Modules/cycles.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/cycles.c?rev=139838&view=auto
==============================================================================
--- cfe/trunk/test/Modules/cycles.c (added)
+++ cfe/trunk/test/Modules/cycles.c Thu Sep 15 15:54:06 2011
@@ -0,0 +1,12 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodule-cache-path %t -F %S/Inputs %s 2>&1 | FileCheck %s
+
+__import_module__ MutuallyRecursive1;
+
+// FIXME: Lots of redundant diagnostics here, because the preprocessor
+// can't currently tell the parser not to try to load the module again.
+
+// CHECK: MutuallyRecursive2.h:3:19: fatal error: cyclic dependency in module 'MutuallyRecursive1': MutuallyRecursive1 -> MutuallyRecursive2 -> MutuallyRecursive1
+// CHECK: MutuallyRecursive1.h:2:19: fatal error: could not build module 'MutuallyRecursive2'
+// CHECK: cycles.c:4:19: fatal error: could not build module 'MutuallyRecursive1'
+





More information about the cfe-commits mailing list