| 1 | // RUN: rm -rf %t %t.nohash |
| 2 | |
| 3 | // Each set of features gets its own cache. |
| 4 | // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fimplicit-module-maps -fmodule-feature f1 -fmodule-feature f2 -F %S/Inputs %s -verify -Rmodule-build |
| 5 | // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fimplicit-module-maps -fmodule-feature f2 -F %S/Inputs %s -verify -Rmodule-build |
| 6 | // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fimplicit-module-maps -fmodule-feature f2 -fmodule-feature f1 -F %S/Inputs %s -Rmodule-build 2>&1 | FileCheck %s -allow-empty -check-prefix=ALREADY_BUILT |
| 7 | // ALREADY_BUILT-NOT: building module |
| 8 | |
| 9 | // Errors if we try to force the load. |
| 10 | // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t.nohash -fimplicit-module-maps -fdisable-module-hash -fmodule-feature f1 -fmodule-feature f2 -F %S/Inputs %s -verify -Rmodule-build |
| 11 | // RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t.nohash -fimplicit-module-maps -fdisable-module-hash -fmodule-feature f2 -F %S/Inputs %s 2>&1 | FileCheck %s -check-prefix=DIFFERS |
| 12 | // DIFFERS: error: module features differs |
| 13 | |
| 14 | @import Module; // expected-remark {{building module 'Module'}} expected-remark {{finished}} |
| 15 | |