summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/redeclarations.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Modules/redeclarations.m')
-rw-r--r--clang/test/Modules/redeclarations.m22
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/Modules/redeclarations.m b/clang/test/Modules/redeclarations.m
new file mode 100644
index 00000000000..1a37230fcc1
--- /dev/null
+++ b/clang/test/Modules/redeclarations.m
@@ -0,0 +1,22 @@
+#ifdef MODULE_LEFT
+@class NSObject;
+#endif
+
+#ifdef MODULE_RIGHT
+@interface NSObject
+@end
+#endif
+
+#ifdef APP
+__import_module__ Right;
+__import_module__ Left;
+
+@interface MyObject : NSObject
+@end
+#endif
+
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodule-cache-path %t -fdisable-module-hash -emit-module -o %t/Left.pcm -DMODULE_LEFT %s
+// RUN: %clang_cc1 -fmodule-cache-path %t -fdisable-module-hash -emit-module -o %t/Right.pcm -DMODULE_RIGHT %s
+// RUN: %clang_cc1 -fmodule-cache-path %t -fdisable-module-hash -DAPP %s -verify
+
OpenPOWER on IntegriCloud