Keep track of import dependencies between submodules within the module
that's currently being built. This is important for supporting
transitive dependencies ("export *" in the module map) completely.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146156 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Modules/submodules.m b/test/Modules/submodules.m
new file mode 100644
index 0000000..e5a050f
--- /dev/null
+++ b/test/Modules/submodules.m
@@ -0,0 +1,11 @@
+
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fauto-module-import -F %S/Inputs %s -verify
+
+// Note: transitively imports Module.Sub2.
+__import_module__ Module.Sub;
+
+int getValue() { 
+  return *Module_Sub + *Module_Sub2;
+}
+