29 lines · plain
1// RUN: rm -rf %t2// RUN: split-file %s %t3//4// RUN: %clang_cc1 -std=c++20 %t/base.cppm -emit-module-interface -o %t/base.pcm5// RUN: %clang_cc1 -std=c++20 %t/update.cppm -fmodule-file=base=%t/base.pcm -emit-module-interface -o %t/update.pcm6// RUN: llvm-bcanalyzer --dump --disable-histogram %t/update.pcm | FileCheck %t/update.cppm --check-prefix=FULL7//8// RUN: %clang_cc1 -std=c++20 %t/base.cppm -emit-reduced-module-interface -o %t/base.pcm9// RUN: %clang_cc1 -std=c++20 %t/update.cppm -fmodule-file=base=%t/base.pcm -emit-reduced-module-interface -o %t/update.pcm10// RUN: llvm-bcanalyzer --dump --disable-histogram %t/update.pcm | FileCheck %t/update.cppm11 12//--- base.cppm13export module base;14 15export template <typename T>16struct base {17 T value;18};19 20//--- update.cppm21export module update;22import base;23export int update() {24 return base<int>().value;25}26 27// FULL: TEMPLATE_SPECIALIZATION28// CHECK-NOT: TEMPLATE_SPECIALIZATION29