brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · 944878b Raw
82 lines · plain
1// Test that adding a new unused decl within reduced BMI may not produce a transitive change.2//3// RUN: rm -rf %t4// RUN: split-file %s %t5//6// RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/T.cppm -o %t/T.pcm   \7// RUN:     -fmodule-file=T=%t/T.pcm8// RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/T1.cppm -o %t/T1.pcm \9// RUN:     -fmodule-file=T=%t/T.pcm10// RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/T2.cppm -o %t/T2.pcm \11// RUN:     -fmodule-file=T=%t/T.pcm12// RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/T3.cppm -o %t/T3.pcm \13// RUN:     -fmodule-file=T=%t/T.pcm14// RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/T4.cppm -o %t/T4.pcm \15// RUN:     -fmodule-file=T=%t/T.pcm16// RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/A.cppm -o %t/A.pcm \17// RUN:     -fmodule-file=T=%t/T.pcm18// RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/AWrapper.cppm -o %t/AWrapper.pcm \19// RUN:      -fprebuilt-module-path=%t20// RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/B.cppm -o %t/B.pcm \21// RUN:     -fprebuilt-module-path=%t22//23// RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/A.v1.cppm -o %t/A.v1.pcm \24// RUN:     -fmodule-file=T=%t/T.pcm25// RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/AWrapper.cppm -o %t/AWrapper.v1.pcm \26// RUN:      -fprebuilt-module-path=%t -fmodule-file=A=%t/A.v1.pcm27// RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/B.cppm -o %t/B.v1.pcm \28// RUN:     -fprebuilt-module-path=%t -fmodule-file=AWrapper=%t/AWrapper.v1.pcm -fmodule-file=A=%t/A.v1.pcm29//30// RUN: not diff %t/B.pcm %t/B.v1.pcm &> /dev/null31 32//--- T.cppm33export module T;34export template <class T>35struct Templ {};36 37//--- T1.cppm38export module T1;39import T;40export using Tunsigned = Templ<unsigned>;41 42//--- T2.cppm43export module T2;44import T;45export using Tfloat = Templ<float>;46 47//--- T3.cppm48export module T3;49import T;50export using Tlong = Templ<long long>;51 52//--- T4.cppm53export module T4;54import T;55export using Tshort = Templ<short>;56 57//--- A.cppm58export module A;59import T;60export using Tint = Templ<int>;61 62//--- A.v1.cppm63export module A;64import T;65export using Tint = Templ<int>;66void __unused__() {}67 68//--- AWrapper.cppm69export module AWrapper;70import A;71 72//--- B.cppm73export module B;74import AWrapper;75import T;76import T1;77import T2;78import T3;79import T4;80 81export using Tdouble = Templ<double>;82