brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 92f7c63 Raw
59 lines · cpp
1// RUN: rm -rf %t2// RUN: mkdir -p %t3// RUN: split-file %s %t4 5// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/partition1.cpp \6// RUN:  -o %t/A-Part1.pcm7 8// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/partition2.cpp \9// RUN:  -o %t/A-Part2.pcm10 11// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/partition3.cpp \12// RUN:  -o %t/A-Part3.pcm13 14// RUN: %clang_cc1 -std=c++20 %t/moduleA.cpp -fsyntax-only -verify \15// RUN:  -fprebuilt-module-path=%t16 17// Test again with reduced BMI18// RUN: rm -rf %t19// RUN: mkdir -p %t20// RUN: split-file %s %t21 22// RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/partition1.cpp \23// RUN:  -o %t/A-Part1.pcm24 25// RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/partition2.cpp \26// RUN:  -o %t/A-Part2.pcm27 28// RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/partition3.cpp \29// RUN:  -o %t/A-Part3.pcm30 31// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %t/moduleA.cpp -fprebuilt-module-path=%t 32 33//--- partition1.cpp34export module A:Part1;35 36int part1();37 38//--- partition2.cpp39 40export module A:Part2;41 42int part2();43 44//--- partition3.cpp45 46export module A:Part3;47 48int part3();49 50//--- moduleA.cpp51// expected-no-diagnostics52export module A;53 54import :Part1;55export import :Part2;56import :Part3;57 58int foo();59