File tree Expand file tree Collapse file tree 2 files changed +3
-19
lines changed Expand file tree Collapse file tree 2 files changed +3
-19
lines changed Original file line number Diff line number Diff line change @@ -570,10 +570,6 @@ class SILModule {
570
570
// / hierarchy of \p Class.
571
571
SILFunction *lookUpFunctionInVTable (ClassDecl *Class, SILDeclRef Member);
572
572
573
- // Given a protocol conformance, attempt to create a witness table declaration
574
- // for it.
575
- SILWitnessTable *createWitnessTableDeclaration (const ProtocolConformance *C);
576
-
577
573
// Given a protocol, attempt to create a default witness table declaration
578
574
// for it.
579
575
SILDefaultWitnessTable *
Original file line number Diff line number Diff line change @@ -143,20 +143,6 @@ void SILModule::deallocateInst(SILInstruction *I) {
143
143
AlignedFree (I);
144
144
}
145
145
146
- SILWitnessTable *
147
- SILModule::createWitnessTableDeclaration (const ProtocolConformance *C) {
148
- // If we are passed in a null conformance (a valid value), just return nullptr
149
- // since we cannot map a witness table to it.
150
- if (!C)
151
- return nullptr ;
152
-
153
- // Extract the root conformance.
154
- auto rootC = C->getRootConformance ();
155
- auto linkage = getLinkageForProtocolConformance (rootC, NotForDefinition);
156
- return SILWitnessTable::create (*this , linkage,
157
- const_cast <RootProtocolConformance *>(rootC));
158
- }
159
-
160
146
SILWitnessTable *
161
147
SILModule::lookUpWitnessTable (ProtocolConformanceRef C,
162
148
bool deserializeLazily) {
@@ -198,7 +184,9 @@ SILModule::lookUpWitnessTable(const ProtocolConformance *C,
198
184
if (!deserializeLazily)
199
185
return nullptr ;
200
186
201
- wtable = createWitnessTableDeclaration (C);
187
+ auto linkage = getLinkageForProtocolConformance (rootC, NotForDefinition);
188
+ wtable = SILWitnessTable::create (*this , linkage,
189
+ const_cast <RootProtocolConformance *>(rootC));
202
190
} else {
203
191
wtable = found->second ;
204
192
assert (wtable != nullptr && " Should never map a conformance to a null witness"
You can’t perform that action at this time.
0 commit comments