summaryrefslogtreecommitdiffstats
path: root/test/Index/Core/Inputs
diff options
context:
space:
mode:
Diffstat (limited to 'test/Index/Core/Inputs')
-rw-r--r--test/Index/Core/Inputs/module/ModDep.h3
-rw-r--r--test/Index/Core/Inputs/module/ModSystem.h4
-rw-r--r--test/Index/Core/Inputs/module/ModTop.h4
-rw-r--r--test/Index/Core/Inputs/module/ModTopSub1.h1
-rw-r--r--test/Index/Core/Inputs/module/ModTopSub2.h1
-rw-r--r--test/Index/Core/Inputs/module/module.modulemap12
-rw-r--r--test/Index/Core/Inputs/sys/system-head.h17
-rw-r--r--test/Index/Core/Inputs/transitive-include.h6
8 files changed, 48 insertions, 0 deletions
diff --git a/test/Index/Core/Inputs/module/ModDep.h b/test/Index/Core/Inputs/module/ModDep.h
new file mode 100644
index 0000000000..e96ef5440f
--- /dev/null
+++ b/test/Index/Core/Inputs/module/ModDep.h
@@ -0,0 +1,3 @@
+#include "ModTop.h"
+
+void ModDep_func(ModTopStruct s);
diff --git a/test/Index/Core/Inputs/module/ModSystem.h b/test/Index/Core/Inputs/module/ModSystem.h
new file mode 100644
index 0000000000..0419f97804
--- /dev/null
+++ b/test/Index/Core/Inputs/module/ModSystem.h
@@ -0,0 +1,4 @@
+
+typedef struct {} ModSystemStruct;
+
+void ModSystem_func(void);
diff --git a/test/Index/Core/Inputs/module/ModTop.h b/test/Index/Core/Inputs/module/ModTop.h
new file mode 100644
index 0000000000..60c56868bb
--- /dev/null
+++ b/test/Index/Core/Inputs/module/ModTop.h
@@ -0,0 +1,4 @@
+
+typedef struct {} ModTopStruct;
+
+void ModTop_func(void);
diff --git a/test/Index/Core/Inputs/module/ModTopSub1.h b/test/Index/Core/Inputs/module/ModTopSub1.h
new file mode 100644
index 0000000000..e1e3cf3ec5
--- /dev/null
+++ b/test/Index/Core/Inputs/module/ModTopSub1.h
@@ -0,0 +1 @@
+void ModTopSub1_func(void);
diff --git a/test/Index/Core/Inputs/module/ModTopSub2.h b/test/Index/Core/Inputs/module/ModTopSub2.h
new file mode 100644
index 0000000000..39d37f12f0
--- /dev/null
+++ b/test/Index/Core/Inputs/module/ModTopSub2.h
@@ -0,0 +1 @@
+// This header has no symbols, intended to show up as file dependency.
diff --git a/test/Index/Core/Inputs/module/module.modulemap b/test/Index/Core/Inputs/module/module.modulemap
index a132562eaf..ee4bf12953 100644
--- a/test/Index/Core/Inputs/module/module.modulemap
+++ b/test/Index/Core/Inputs/module/module.modulemap
@@ -1 +1,13 @@
module ModA { header "ModA.h" export * }
+module ModDep { header "ModDep.h" export * }
+module ModSystem [system] { header "ModSystem.h" export * }
+module ModTop {
+ header "ModTop.h"
+ export *
+ module Sub1 {
+ header "ModTopSub1.h"
+ }
+ module Sub2 {
+ header "ModTopSub2.h"
+ }
+}
diff --git a/test/Index/Core/Inputs/sys/system-head.h b/test/Index/Core/Inputs/sys/system-head.h
index df0e39ed86..b5d4291886 100644
--- a/test/Index/Core/Inputs/sys/system-head.h
+++ b/test/Index/Core/Inputs/sys/system-head.h
@@ -1,3 +1,20 @@
+// UNIT: index-system.mm.o
+// UNIT: is-system: 0
+// UNIT: is-module: 0
+// UNIT: has-main: 1
+// UNIT: main-path: {{.*}}index-system.mm
+// UNIT: out-file: {{.*}}index-system.mm.o
+// UNIT: is-debug: 1
+
+// UNIT: DEPEND START
+// UNIT: File | user | {{.*}}index-system.mm
+// UNIT: File | system | {{.*}}system-head.h
+// UNIT: DEPEND END (2)
+
+// UNIT: INCLUDE START
+// UNIT: {{.*}}index-system.mm:4 -> {{.*}}system-head.h
+// UNIT: INCLUDE END (1)
+
// CHECK: [[@LINE+1]]:12 | class/ObjC | Base | [[Base_USR:.*]] | {{.*}} | Decl | rel: 0
@interface Base
@end
diff --git a/test/Index/Core/Inputs/transitive-include.h b/test/Index/Core/Inputs/transitive-include.h
new file mode 100644
index 0000000000..b6564d89bd
--- /dev/null
+++ b/test/Index/Core/Inputs/transitive-include.h
@@ -0,0 +1,6 @@
+#include "system-head.h"
+
+struct Point {
+ int x;
+ int y;
+};