brintos

brintos / llvm-project-archived public Read only

0
0
Text · 984 B · 5732d26 Raw
39 lines · plain
1// Test that the changes from export imported modules and touched2// modules can be popullated as expected.3//4// RUN: rm -rf %t5// RUN: split-file %s %t6// RUN: cd %t7//8// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-reduced-module-interface -o %t/A.pcm9// RUN: %clang_cc1 -std=c++20 %t/A.v1.cppm -emit-reduced-module-interface -o %t/A.v1.pcm10 11// The BMI of B should change it export imports A, so all the change to A should be popullated12// 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.pcm15// 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.pcm17// RUN: not diff %t/B.v1.pcm %t/B.pcm  &> /dev/null18 19//--- A.cppm20export module A;21export int funcA() {22    return 43;23}24 25//--- A.v1.cppm26export module A;27 28export int funcA() {29    return 43;30}31 32//--- B.cppm33export module B;34export import A;35 36export int funcB() {37    return funcA();38}39