brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 82ecb40 Raw
52 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/std10-3-ex1-tu1.cpp \6// RUN:  -o %t/M_PartImpl.pcm7 8// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/std10-3-ex1-tu2.cpp \9// RUN:  -fmodule-file=M:PartImpl=%t/M_PartImpl.pcm -o %t/M.pcm -verify10 11// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/std10-3-ex1-tu3.cpp \12// RUN:  -o %t/M_Part.pcm13 14// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/std10-3-ex1-tu4.cpp \15// RUN:  -fmodule-file=M:Part=%t/M_Part.pcm -o %t/M.pcm16 17// Test again with reduced BMI.18// RUN: rm %t/M_PartImpl.pcm %t/M.pcm %t/M_Part.pcm19// RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/std10-3-ex1-tu1.cpp \20// RUN:  -o %t/M_PartImpl.pcm21 22// RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/std10-3-ex1-tu2.cpp \23// RUN:  -fmodule-file=M:PartImpl=%t/M_PartImpl.pcm -o %t/M.pcm -verify24 25// RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/std10-3-ex1-tu3.cpp \26// RUN:  -o %t/M_Part.pcm27 28// RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/std10-3-ex1-tu4.cpp \29// RUN:  -fmodule-file=M:Part=%t/M_Part.pcm -o %t/M.pcm30 31//--- std10-3-ex1-tu1.cpp32module M:PartImpl;33 34// expected-no-diagnostics35 36//--- std10-3-ex1-tu2.cpp37export module M;38                     // error: exported partition :Part is an implementation unit39export import :PartImpl; // expected-error {{module partition implementations cannot be exported}}40                         // expected-warning@-1 {{importing an implementation partition unit in a module interface is not recommended.}}41 42//--- std10-3-ex1-tu3.cpp43export module M:Part;44 45// expected-no-diagnostics46 47//--- std10-3-ex1-tu4.cpp48export module M;49export import :Part;50 51// expected-no-diagnostics52