brintos

brintos / llvm-project-archived public Read only

0
0
Text · 866 B · 85254d0 Raw
38 lines · plain
1// RUN: rm -rf %t2// RUN: mkdir -p %t3// RUN: split-file %s %t4//5// RUN: %clang_cc1 -std=c++20 %t/a.cppm -emit-module-interface -o %t/a.pcm6// RUN: %clang_cc1 -std=c++20 %t/b.cppm -fmodule-file=a=%t/a.pcm -fsyntax-only -verify7// RUN: %clang_cc1 -std=c++20 %t/use.cpp -fmodule-file=a=%t/a.pcm -fsyntax-only -verify8//9// RUN: %clang_cc1 -std=c++20 %t/M-Part.cppm -emit-module-interface -o %t/M-Part.pcm10// RUN: %clang_cc1 -std=c++20 %t/M.cppm -fmodule-file=M:Part=%t/M-Part.pcm -fsyntax-only -verify11 12//--- a.cppm13export module a;14export int foo() { return 43; }15 16//--- b.cppm17// expected-no-diagnostics18export module b;19import a;20export int b() {21    return foo();22}23 24//--- use.cpp25// expected-no-diagnostics26import a;27int Use() {28    return foo();29}30 31//--- M-Part.cppm32export module M:Part;33 34//--- M.cppm35// expected-no-diagnostics36export module M;37import :Part;38