3 // RUN: split-file %s %t
5 // RUNX: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
6 // RUNX: -emit-module-interface %t/a.cppm -o %t/a.pcm
7 // RUNX: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
8 // RUNX: %t/b.cpp -fmodule-file=a=%t/a.pcm -disable-llvm-passes \
9 // RUNX: -emit-llvm -o - | FileCheck %t/b.cpp
10 // RUNX: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
11 // RUNX: %t/c.cpp -fmodule-file=a=%t/a.pcm -disable-llvm-passes \
12 // RUNX: -emit-llvm -o - | FileCheck %t/c.cpp
14 // Test again with reduced BMI.
17 // RUN: split-file %s %t
19 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
20 // RUN: -emit-reduced-module-interface %t/a.cppm -o %t/a.pcm
21 // RUNX: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
22 // RUNX: %t/b.cpp -fmodule-file=a=%t/a.pcm -disable-llvm-passes \
23 // RUNX: -emit-llvm -o - | FileCheck %t/b.cpp
24 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
25 // RUN: %t/c.cpp -fmodule-file=a=%t/a.pcm -disable-llvm-passes \
26 // RUN: -emit-llvm -o - | FileCheck %t/c.cpp
32 explicit operator int() const {
37 export template<typename>
38 int a = static_cast<int>(integer());
50 // CHECK-NOT: @_ZW1a1dIvE =
51 // CHECK-NOT: @_ZGVW1a1dIvE =
52 // CHECK-NOT: @_ZW1a11dynamic_var =
53 // CHECK-NOT: @_ZGVW1a11dynamic_var =
54 // CHECK-NOT: @_ZW1a1aIvE =
55 // CHECK-NOT: @_ZGVW1a1aIvE =
63 // The used variables are generated normally
64 // CHECK-DAG: @_ZW1a1aIvE =
65 // CHECK-DAG: @_ZGVW1a1aIvE =