diff options
Diffstat (limited to 'clang/test/Modules/implicit-opt-level.c')
| -rw-r--r-- | clang/test/Modules/implicit-opt-level.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/Modules/implicit-opt-level.c b/clang/test/Modules/implicit-opt-level.c new file mode 100644 index 000000000000..f6f1f58d31d7 --- /dev/null +++ b/clang/test/Modules/implicit-opt-level.c @@ -0,0 +1,15 @@ +// This test checks that under implicit modules, different optimization levels +// get different context hashes. + +// RUN: rm -rf %t +// RUN: split-file %s %t + +//--- module.modulemap +module M { header "M.h" } +//--- M.h +//--- tu.c +#include "M.h" + +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache -O0 -fsyntax-only %t/tu.c +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache -O1 -fsyntax-only %t/tu.c +// RUN: find %t/cache -name "M-*.pcm" | count 2 |
