summaryrefslogtreecommitdiff
path: root/test/Modules/modify-module.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/Modules/modify-module.m')
-rw-r--r--test/Modules/modify-module.m23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/Modules/modify-module.m b/test/Modules/modify-module.m
new file mode 100644
index 0000000000000..b630ac1058745
--- /dev/null
+++ b/test/Modules/modify-module.m
@@ -0,0 +1,23 @@
+// Test that if we modify one of the input files used to form a
+// header, that module and dependent modules get rebuilt.
+
+// RUN: rm -rf %t
+// RUN: mkdir -p %t/include
+// RUN: cp %S/Inputs/Modified/A.h %t/include
+// RUN: cp %S/Inputs/Modified/B.h %t/include
+// RUN: cp %S/Inputs/Modified/module.map %t/include
+// RUN: %clang_cc1 -fmodule-cache-path %t/cache -fmodules -I %t/include %s -verify
+// expected-no-diagnostics
+// RUN: touch %t/include/B.h
+// RUN: %clang_cc1 -fmodule-cache-path %t/cache -fmodules -I %t/include %s -verify
+// RUN: echo 'int getA(); int getA2();' > %t/include/A.h
+// RUN: %clang_cc1 -fmodule-cache-path %t/cache -fmodules -I %t/include %s -verify
+
+@__experimental_modules_import B;
+
+int getValue() { return getA() + getB(); }
+
+
+
+
+