================ @@ -0,0 +1,41 @@ +// RUN: rm -rf %t +// RUN: split-file %s %t + +// Build A without knowing about the module map for B. +// +// This means "b.h" is included textually and embedded into the PCM for module A +// with B_VALUE set to 1. +// +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache \ +// RUN: -fmodules-strict-context-hash -I %t/a -I %t/b %t/tu.c -E -o - + +// Load A with module map for B being known. +// +// This should make it so that module A turns the header inclusion into a module +// import of B, which gets built with clean preprocessor state, resulting in the +// macro B_VALUE set to 2. +// +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache \ +// RUN: -fmodules-strict-context-hash -I %t/a -I %t/b %t/tu.c -E -o - \ +// RUN: -fmodule-map-file=%t/b/b.modulemap | FileCheck %s ---------------- cyndyishida wrote:
nit: my preference is to also explicitly or directly check the hashes no longer match between the 2 invocations or that the earlier PCM is not reused. https://github.com/llvm/llvm-project/pull/227776 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
