1// Test that the changes from export imported modules and touched 2// modules can be popullated as expected. 3// 4// RUN: rm -rf %t 5// RUN: split-file %s %t 6// RUN: cd %t 7// 8// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-reduced-module-interface -o %t/A.pcm 9// RUN: %clang_cc1 -std=c++20 %t/A.v1.cppm -emit-reduced-module-interface -o %t/A.v1.pcm 10 11// The BMI of B should change it export imports A, so all the change to A should be popullated 12// to B. 13// RUN: %clang_cc1 -std=c++20 %t/B.cppm -emit-reduced-module-interface -fmodule-file=A=%t/A.pcm \ 14// RUN: -o %t/B.pcm 15// RUN: %clang_cc1 -std=c++20 %t/B.cppm -emit-reduced-module-interface -fmodule-file=A=%t/A.v1.pcm \ 16// RUN: -o %t/B.v1.pcm 17// RUN: not diff %t/B.v1.pcm %t/B.pcm &> /dev/null 18 19//--- A.cppm 20export module A; 21export int funcA() { 22 return 43; 23} 24 25//--- A.v1.cppm 26export module A; 27 28export int funcA() { 29 return 43; 30} 31 32//--- B.cppm 33export module B; 34export import A; 35 36export int funcB() { 37 return funcA(); 38} 39