diff options
Diffstat (limited to 'clang/test')
5 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/header-in-multiple-maps/a.h b/clang/test/Modules/Inputs/header-in-multiple-maps/a.h new file mode 100644 index 00000000000..4c5cd949f23 --- /dev/null +++ b/clang/test/Modules/Inputs/header-in-multiple-maps/a.h @@ -0,0 +1 @@ +struct A {}; diff --git a/clang/test/Modules/Inputs/header-in-multiple-maps/map1 b/clang/test/Modules/Inputs/header-in-multiple-maps/map1 new file mode 100644 index 00000000000..ba9baac00ca --- /dev/null +++ b/clang/test/Modules/Inputs/header-in-multiple-maps/map1 @@ -0,0 +1,3 @@ +module a { header "a.h" } +module b { header "a.h" } +module c { textual header "a.h" } diff --git a/clang/test/Modules/Inputs/header-in-multiple-maps/map2 b/clang/test/Modules/Inputs/header-in-multiple-maps/map2 new file mode 100644 index 00000000000..67e0df3b55f --- /dev/null +++ b/clang/test/Modules/Inputs/header-in-multiple-maps/map2 @@ -0,0 +1,3 @@ +module a { textual header "a.h" } +module b { header "a.h" } +module c { header "a.h" } diff --git a/clang/test/Modules/Inputs/header-in-multiple-maps/map3 b/clang/test/Modules/Inputs/header-in-multiple-maps/map3 new file mode 100644 index 00000000000..c859fd74b5d --- /dev/null +++ b/clang/test/Modules/Inputs/header-in-multiple-maps/map3 @@ -0,0 +1,3 @@ +module a { header "a.h" } +module b { textual header "a.h" } +module c { header "a.h" } diff --git a/clang/test/Modules/header-in-multiple-maps.cpp b/clang/test/Modules/header-in-multiple-maps.cpp new file mode 100644 index 00000000000..a9c0c80eca8 --- /dev/null +++ b/clang/test/Modules/header-in-multiple-maps.cpp @@ -0,0 +1,9 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/header-in-multiple-maps -fmodule-map-file=%S/Inputs/header-in-multiple-maps/map1 -verify %s +// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/header-in-multiple-maps -fmodule-map-file=%S/Inputs/header-in-multiple-maps/map2 -verify %s +// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/header-in-multiple-maps -fmodule-map-file=%S/Inputs/header-in-multiple-maps/map3 -verify %s +// expected-no-diagnostics + +#include "a.h" +#include "a.h" +A *p; |