Skip to content

Commit 1b521a5

Browse files
committed
[PrintAsClang] Don't attempt forward declare marker protocols
1 parent 9dcb921 commit 1b521a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/PrintAsClang/ModuleContentsWriter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,8 @@ class ModuleWriter {
326326
(void)addImport(CD);
327327
}
328328
} else if (auto PD = dyn_cast<ProtocolDecl>(TD)) {
329-
forwardDeclare(PD);
329+
if (!PD->isMarkerProtocol())
330+
forwardDeclare(PD);
330331
} else if (auto TAD = dyn_cast<TypeAliasDecl>(TD)) {
331332
bool imported = false;
332333
if (TAD->hasClangNode())

0 commit comments

Comments
 (0)