diff options
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Modules/Inputs/Modified/A.h | 1 | ||||
| -rw-r--r-- | clang/test/Modules/Inputs/Modified/B.h | 2 | ||||
| -rw-r--r-- | clang/test/Modules/Inputs/Modified/module.map | 2 | ||||
| -rw-r--r-- | clang/test/Modules/modify-module.m | 23 |
4 files changed, 28 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/Modified/A.h b/clang/test/Modules/Inputs/Modified/A.h new file mode 100644 index 00000000000..ff833c7520f --- /dev/null +++ b/clang/test/Modules/Inputs/Modified/A.h @@ -0,0 +1 @@ +int getA(); diff --git a/clang/test/Modules/Inputs/Modified/B.h b/clang/test/Modules/Inputs/Modified/B.h new file mode 100644 index 00000000000..d1c8bb5e8e1 --- /dev/null +++ b/clang/test/Modules/Inputs/Modified/B.h @@ -0,0 +1,2 @@ +#include "A.h" +int getB(); diff --git a/clang/test/Modules/Inputs/Modified/module.map b/clang/test/Modules/Inputs/Modified/module.map new file mode 100644 index 00000000000..d9aed01430c --- /dev/null +++ b/clang/test/Modules/Inputs/Modified/module.map @@ -0,0 +1,2 @@ +module A { header "A.h" } +module B { header "B.h" } diff --git a/clang/test/Modules/modify-module.m b/clang/test/Modules/modify-module.m new file mode 100644 index 00000000000..b630ac10587 --- /dev/null +++ b/clang/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(); } + + + + + |

