Skip to content

Commit b35dde7

Browse files
committed
Serialization: Fix missing register*Abbr() calls for variadic generic SIL stuff
1 parent 4f68baf commit b35dde7

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

lib/Serialization/Serialization.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5549,6 +5549,7 @@ void Serializer::writeAllDeclsAndTypes() {
55495549
registerDeclTypeAbbr<ExistentialMetatypeTypeLayout>();
55505550
registerDeclTypeAbbr<PrimaryArchetypeTypeLayout>();
55515551
registerDeclTypeAbbr<OpenedArchetypeTypeLayout>();
5552+
registerDeclTypeAbbr<ElementArchetypeTypeLayout>();
55525553
registerDeclTypeAbbr<OpaqueArchetypeTypeLayout>();
55535554
registerDeclTypeAbbr<PackArchetypeTypeLayout>();
55545555
registerDeclTypeAbbr<ProtocolCompositionTypeLayout>();
@@ -5568,6 +5569,7 @@ void Serializer::writeAllDeclsAndTypes() {
55685569
registerDeclTypeAbbr<DynamicSelfTypeLayout>();
55695570
registerDeclTypeAbbr<PackExpansionTypeLayout>();
55705571
registerDeclTypeAbbr<PackTypeLayout>();
5572+
registerDeclTypeAbbr<SILPackTypeLayout>();
55715573

55725574
registerDeclTypeAbbr<ErrorFlagLayout>();
55735575
registerDeclTypeAbbr<ErrorTypeLayout>();

lib/Serialization/SerializeSIL.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3057,6 +3057,8 @@ void SILSerializer::writeSILBlock(const SILModule *SILMod) {
30573057
registerSILAbbr<SILInstLinearFunctionExtractLayout>();
30583058
registerSILAbbr<SILInstIncrementProfilerCounterLayout>();
30593059
registerSILAbbr<SILInstHasSymbolLayout>();
3060+
registerSILAbbr<SILPackElementGetLayout>();
3061+
registerSILAbbr<SILPackElementSetLayout>();
30603062

30613063
registerSILAbbr<VTableLayout>();
30623064
registerSILAbbr<VTableEntryLayout>();
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %target-swift-frontend -emit-module %s -emit-module-path %t/pack_expansion_type.swiftmodule -DLIB
3+
// RUN: %target-swift-frontend -emit-sil %s -I %t -DAPP
4+
5+
#if LIB
6+
7+
public func callee<each T>(_: repeat each T) {}
8+
9+
@_transparent public func caller<each T>(_ t: repeat each T) {
10+
callee(repeat [each t])
11+
}
12+
13+
#elseif APP
14+
15+
import pack_expansion_type
16+
17+
caller(1, "hi", false)
18+
19+
#endif

0 commit comments

Comments
 (0)