1 // Tests that the declaration won't get emitted after being merged.
5 // RUN: split-file %s %t
7 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/A.cppm -emit-module-interface -o %t/A.pcm
8 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/B.cppm -emit-module-interface -o %t/B.pcm \
9 // RUN: -fprebuilt-module-path=%t
10 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/B.pcm -emit-llvm -o - \
11 // RUN: -fprebuilt-module-path=%t | FileCheck %t/B.cppm
13 // Test again with reduced BMI. Note that we need to generate full BMI for B.cppm
14 // since it is required to generate backend codes.
15 // RUN: rm %t/A.pcm %t/B.pcm
16 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/A.cppm -emit-reduced-module-interface -o %t/A.pcm
17 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/B.cppm -emit-module-interface -o %t/B.pcm \
18 // RUN: -fprebuilt-module-path=%t
19 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/B.pcm -emit-llvm -o - \
20 // RUN: -fprebuilt-module-path=%t | FileCheck %t/B.cppm
29 T GetValue() { return value; }
32 template class foo<int>;
51 // CHECK-NOT: define{{.*}}@_ZN3fooIiE8GetValueEv