File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ // RUN: rm -rf %t
2+ // RUN: split-file %s %t
3+ //
4+ // RUN: %clang_cc1 -std=c++20 %t/base.cppm -emit-module-interface -o %t/base.pcm
5+ // RUN: %clang_cc1 -std=c++20 %t/update.cppm -fmodule-file=base=%t/base.pcm -emit-module-interface -o %t/update.pcm
6+ // RUN: llvm-bcanalyzer --dump --disable-histogram %t/update.pcm | FileCheck %t/update.cppm --check-prefix=FULL
7+ //
8+ // RUN: %clang_cc1 -std=c++20 %t/base.cppm -emit-reduced-module-interface -o %t/base.pcm
9+ // RUN: %clang_cc1 -std=c++20 %t/update.cppm -fmodule-file=base=%t/base.pcm -emit-reduced-module-interface -o %t/update.pcm
10+ // RUN: llvm-bcanalyzer --dump --disable-histogram %t/update.pcm | FileCheck %t/update.cppm
11+
12+ // --- base.cppm
13+ export module base;
14+
15+ export template <typename T>
16+ struct base {
17+ T value;
18+ };
19+
20+ // --- update.cppm
21+ export module update;
22+ import base;
23+ export int update () {
24+ return base<int >().value ;
25+ }
26+
27+ // FULL: TEMPLATE_SPECIALIZATION
28+ // CHECK-NOT: TEMPLATE_SPECIALIZATION
You can’t perform that action at this time.
0 commit comments