diff options
| author | Douglas Gregor <dgregor@apple.com> | 2012-11-07 17:46:15 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2012-11-07 17:46:15 +0000 |
| commit | 188dbef26df3901195869ff19273323d657e995f (patch) | |
| tree | bd511d7f3af88db0e1ada6ef900c9e72815459d3 /clang/test | |
| parent | b9db60fbce070a0eef80de620ac59b2a1b8869ec (diff) | |
| download | bcm5719-llvm-188dbef26df3901195869ff19273323d657e995f.tar.gz bcm5719-llvm-188dbef26df3901195869ff19273323d657e995f.zip | |
When loading a module fails because it is out of date, rebuild that
module in place. <rdar://problem/10138913>
llvm-svn: 167539
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(); } + + + + + |

