brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 3ad371b Raw
48 lines · plain
1// RUN: rm -rf %t2// RUN: mkdir %t3// RUN: split-file %s %t4//5// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/a.cppm -o %t/a.pcm6// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/b.cppm -o %t/b.pcm7// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/c.cppm -o %t/c.pcm8//9// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t -emit-module-interface %t/aggregate.internal.cppm -o %t/aggregate.internal.pcm10// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t -emit-module-interface %t/aggregate.cppm -o %t/aggregate.pcm11//12// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/use.cpp -verify -DTEST13 14 15//--- a.cppm16export module a;17export class A{};18 19//--- b.cppm20export module b;21export class B{};22 23//--- c.cppm24export module c;25export class C{};26 27//--- aggregate.internal.cppm28export module aggregate.internal;29export import a;30export import b;31export import c;32 33//--- aggregate.cppm34// Export the above aggregate module.35// This is done to ensure that re-exports are transitive.36export module aggregate;37export import aggregate.internal;38 39 40//--- use.cpp41// expected-no-diagnostics42// For the actual test, just try using the classes from the exported modules43// and hope that they're accessible.44import aggregate;45A a;46B b;47C c;48