diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-05-08 20:30:47 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-05-08 20:30:47 +0000 |
| commit | 4a3751ff246394755e113f162435829b7d67d6ed (patch) | |
| tree | 99e287c7f086be0e9c50f99b2b8783c91fba3a98 /clang/test | |
| parent | c48c993b752a848016be06f73ca3dc797b09d6d6 (diff) | |
| download | bcm5719-llvm-4a3751ff246394755e113f162435829b7d67d6ed.tar.gz bcm5719-llvm-4a3751ff246394755e113f162435829b7d67d6ed.zip | |
If we are building a module, and we read a second description of the same
module from a different module map, ignore it.
This happens during builds of preprocessed modules (where it is harmless).
llvm-svn: 302463
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Modules/preprocess-module.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Modules/preprocess-module.cpp b/clang/test/Modules/preprocess-module.cpp index a3b78923838..64af00c471d 100644 --- a/clang/test/Modules/preprocess-module.cpp +++ b/clang/test/Modules/preprocess-module.cpp @@ -19,6 +19,11 @@ // RUN: %clang_cc1 -fmodules -fmodule-name=file -fmodule-file=%t/fwd.pcm -x c++-module-map-cpp-output %t/no-rewrite.ii -emit-module -o %t/no-rewrite.pcm // RUN: %clang_cc1 -fmodules -fmodule-name=file -fmodule-file=%t/fwd.pcm -x c++-module-map-cpp-output %t/rewrite.ii -emit-module -o %t/rewrite.pcm +// Check that we can load the original module map in the same compilation (this +// could happen if we had a redundant -fmodule-map-file= in the original +// build). +// RUN: %clang_cc1 -fmodules -fmodule-name=file -fmodule-file=%t/fwd.pcm -fmodule-map-file=%S/Inputs/preprocess/module.modulemap -x c++-module-map-cpp-output %t/rewrite.ii -emit-module -o /dev/null + // Check the module we built works. // RUN: %clang_cc1 -fmodules -fmodule-file=%t/no-rewrite.pcm %s -verify // RUN: %clang_cc1 -fmodules -fmodule-file=%t/rewrite.pcm %s -verify |

