3 // RUN: split-file %s %t
5 // RUN: %clang_cc1 -std=c++20 %t/a.cppm -emit-reduced-module-interface -o %t/a.reduced.pcm
6 // RUN: %clang_cc1 -std=c++20 %t/a.cppm -fexperimental-modules-reduced-bmi -fmodule-output=%t/a.pcm \
7 // RUN: -emit-llvm -o %t/a.ll
9 // Test that the generated BMI from `-fexperimental-modules-reduced-bmi -fmodule-output=` is same with
10 // `-emit-reduced-module-interface`.
11 // RUN: diff %t/a.reduced.pcm %t/a.pcm
13 // Test that we can consume the produced BMI correctly.
14 // RUN: %clang_cc1 -std=c++20 %t/b.cppm -fmodule-file=a=%t/a.pcm -fsyntax-only -verify
16 // RUN: rm -f %t/a.pcm
17 // RUN: %clang_cc1 -std=c++20 %t/a.cppm -fexperimental-modules-reduced-bmi -fmodule-output=%t/a.pcm \
18 // RUN: -emit-module-interface -o %t/a.full.pcm
19 // RUN: diff %t/a.reduced.pcm %t/a.pcm
20 // RUN: not diff %t/a.pcm %t/a.full.pcm
22 // RUN: %clang_cc1 -std=c++20 %t/b.cppm -fmodule-file=a=%t/a.pcm -fsyntax-only -verify
23 // RUN: %clang_cc1 -std=c++20 %t/b.cppm -fmodule-file=a=%t/a.full.pcm -fsyntax-only -verify
32 // Test that we can consume the produced BMI correctly as a smocking test.
33 // expected-no-diagnostics
36 export int b() { return a(); }