Skip to content

Commit afed427

Browse files
authored
Merge pull request swiftlang#42132 from DougGregor/sil-linker-no-fake-marker-protocol-conformances
2 parents b94d6eb + fdbeb45 commit afed427

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/SIL/IR/Linker.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,10 @@ void SILLinkerVisitor::visitProtocolConformance(ProtocolConformanceRef ref) {
259259
if ((!WT || WT->isDeclaration()) &&
260260
(mustDeserialize || Mode == SILModule::LinkingMode::LinkAll)) {
261261
if (!WT) {
262+
// Marker protocols should never have witness tables.
263+
if (C->getProtocol()->isMarkerProtocol())
264+
return;
265+
262266
RootProtocolConformance *rootC = C->getRootConformance();
263267
SILLinkage linkage = getLinkageForProtocolConformance(rootC, NotForDefinition);
264268
WT = SILWitnessTable::create(Mod, linkage,

0 commit comments

Comments
 (0)