summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Modules')
-rw-r--r--clang/test/Modules/Inputs/prebuilt-module/a.h1
-rw-r--r--clang/test/Modules/Inputs/prebuilt-module/module.modulemap1
-rw-r--r--clang/test/Modules/prebuilt-module.m10
3 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/prebuilt-module/a.h b/clang/test/Modules/Inputs/prebuilt-module/a.h
new file mode 100644
index 00000000000..f86587a8396
--- /dev/null
+++ b/clang/test/Modules/Inputs/prebuilt-module/a.h
@@ -0,0 +1 @@
+const int a = 1;
diff --git a/clang/test/Modules/Inputs/prebuilt-module/module.modulemap b/clang/test/Modules/Inputs/prebuilt-module/module.modulemap
new file mode 100644
index 00000000000..54459bde5ba
--- /dev/null
+++ b/clang/test/Modules/Inputs/prebuilt-module/module.modulemap
@@ -0,0 +1 @@
+module prebuilt { header "a.h" }
diff --git a/clang/test/Modules/prebuilt-module.m b/clang/test/Modules/prebuilt-module.m
new file mode 100644
index 00000000000..a9c69942e89
--- /dev/null
+++ b/clang/test/Modules/prebuilt-module.m
@@ -0,0 +1,10 @@
+// RUN: rm -rf %t
+//
+// RUN: %clang_cc1 -fmodules -x objective-c -I %S/Inputs/prebuilt-module -triple %itanium_abi_triple -emit-module %S/Inputs/prebuilt-module/module.modulemap -fmodule-name=prebuilt -o %t/prebuilt.pcm
+// RUN: %clang_cc1 -fmodules -fprebuilt-module-path=%t/ -fdisable-module-hash %s -verify
+
+// expected-no-diagnostics
+@import prebuilt;
+int test() {
+ return a;
+}
OpenPOWER on IntegriCloud