1 // https://github.com/llvm/llvm-project/issues/59780
5 // RUN: split-file %s %t
7 // RUN: %clang_cc1 -std=c++20 %t/a.cppm -triple %itanium_abi_triple -emit-module-interface -o %t/a.pcm
8 // RUN: %clang_cc1 -std=c++20 %t/use.cpp -fprebuilt-module-path=%t \
9 // RUN: -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %t/use.cpp
10 // RUN: %clang_cc1 -std=c++20 %t/a.pcm -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %t/a.cppm
12 // Test again with reduced BMI.
13 // RUN: %clang_cc1 -std=c++20 %t/a.cppm -triple %itanium_abi_triple -emit-module-interface \
14 // RUN: -o %t/a.full.pcm
15 // RUN: %clang_cc1 -std=c++20 %t/a.cppm -triple %itanium_abi_triple -emit-reduced-module-interface \
17 // RUN: %clang_cc1 -std=c++20 %t/use.cpp -fprebuilt-module-path=%t \
18 // RUN: -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %t/use.cpp
19 // RUN: %clang_cc1 -std=c++20 %t/a.full.pcm -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %t/a.cppm
25 export template<typename T>
31 export template<typename T>
44 int Y<int>::value = 0;
46 // CHECK-NOT: @_ZW1a1xIiE = {{.*}}external{{.*}}global
47 // CHECK-NOT: @_ZNW1a1YIiE5valueE = {{.*}}external{{.*}}global
52 return x<int> + Y<int>::value;
55 // CHECK: @_ZW1a1xIiE = {{.*}}external{{.*}}global
56 // CHECK: @_ZNW1a1YIiE5valueE = {{.*}}external{{.*}}global