diff options
| author | Douglas Gregor <dgregor@apple.com> | 2013-03-21 01:08:50 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2013-03-21 01:08:50 +0000 |
| commit | 0339a64a40e5b0a48398382a6523545f142cf3a1 (patch) | |
| tree | 9baa1de4d58b5a5b5fcb3696f9d6e0241bb4c187 /clang/test/Modules | |
| parent | 4ab769f4b322a1cef901522a2527f35940bde004 (diff) | |
| download | bcm5719-llvm-0339a64a40e5b0a48398382a6523545f142cf3a1.tar.gz bcm5719-llvm-0339a64a40e5b0a48398382a6523545f142cf3a1.zip | |
<rdar://problem/13037793> Allow the names of modules to differ from the name of their subdirectory in the include path.
llvm-svn: 177621
Diffstat (limited to 'clang/test/Modules')
| -rw-r--r-- | clang/test/Modules/Inputs/Modified/B.h | 2 | ||||
| -rw-r--r-- | clang/test/Modules/Inputs/Modified/module.map | 4 | ||||
| -rw-r--r-- | clang/test/Modules/Inputs/oldname/module.map | 4 | ||||
| -rw-r--r-- | clang/test/Modules/Inputs/oldname/new_name.h | 1 | ||||
| -rw-r--r-- | clang/test/Modules/modify-module.m | 6 | ||||
| -rw-r--r-- | clang/test/Modules/renamed.m | 8 |
6 files changed, 19 insertions, 6 deletions
diff --git a/clang/test/Modules/Inputs/Modified/B.h b/clang/test/Modules/Inputs/Modified/B.h index f50dd80ca4e..52526b7f3ab 100644 --- a/clang/test/Modules/Inputs/Modified/B.h +++ b/clang/test/Modules/Inputs/Modified/B.h @@ -1,3 +1,3 @@ -@import A; +@import ModA; int getB(); diff --git a/clang/test/Modules/Inputs/Modified/module.map b/clang/test/Modules/Inputs/Modified/module.map index 50aaebc5c75..27b0d7062c7 100644 --- a/clang/test/Modules/Inputs/Modified/module.map +++ b/clang/test/Modules/Inputs/Modified/module.map @@ -1,5 +1,5 @@ -module A { header "A.h" } -module B { +module ModA { header "A.h" } +module ModB { header "B.h" export * } diff --git a/clang/test/Modules/Inputs/oldname/module.map b/clang/test/Modules/Inputs/oldname/module.map new file mode 100644 index 00000000000..5812f869b34 --- /dev/null +++ b/clang/test/Modules/Inputs/oldname/module.map @@ -0,0 +1,4 @@ +module NewName { + header "new_name.h" + export * +} diff --git a/clang/test/Modules/Inputs/oldname/new_name.h b/clang/test/Modules/Inputs/oldname/new_name.h new file mode 100644 index 00000000000..8bf2f1c8c31 --- /dev/null +++ b/clang/test/Modules/Inputs/oldname/new_name.h @@ -0,0 +1 @@ +int same_api; diff --git a/clang/test/Modules/modify-module.m b/clang/test/Modules/modify-module.m index decd07de080..953c917cddc 100644 --- a/clang/test/Modules/modify-module.m +++ b/clang/test/Modules/modify-module.m @@ -11,9 +11,9 @@ // RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -I %t/include %s -verify // RUN: echo 'int getA(); int getA2();' > %t/include/A.h // RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -I %t/include %s -verify -// RUN: rm %t/cache/A.pcm +// RUN: rm %t/cache/ModA.pcm // RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -I %t/include %s -verify -// RUN: touch %t/cache/A.pcm +// RUN: touch %t/cache/ModA.pcm // RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -I %t/include %s -verify // expected-no-diagnostics @@ -21,7 +21,7 @@ // FIXME: It is intended to suppress this on win32. // REQUIRES: ansi-escape-sequences -@import B; +@import ModB; int getValue() { return getA() + getB(); } diff --git a/clang/test/Modules/renamed.m b/clang/test/Modules/renamed.m new file mode 100644 index 00000000000..4e8f5329bb0 --- /dev/null +++ b/clang/test/Modules/renamed.m @@ -0,0 +1,8 @@ +@import NewName; + +int f() { return same_api; } + +// RUN: rm -rf %t +// RUN: %clang_cc1 -fmodules -I %S/Inputs -fmodules-cache-path=%t %s -verify + +// expected-no-diagnostics |

