Skip to content

Commit 2451e68

Browse files
committed
[ModuleInterface] Mark dummy conformances with @_spi
Dummy conformances are generated when a conditional conformance is constrained by a type that is not to be printed. In case the types involved are SPI, mark the dummy conformance SPI in the private swiftinterface only.
1 parent dac3922 commit 2451e68

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Frontend/ModuleInterfaceSupport.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,8 @@ class InheritedProtocolCollector {
481481
return false;
482482
assert(nominal->isGenericContext());
483483

484+
if (printOptions.PrintSPIs)
485+
out << "@_spi(" << DummyProtocolName << ")\n";
484486
out << "@available(*, unavailable)\nextension ";
485487
nominal->getDeclaredType().print(out, printOptions);
486488
out << " : ";

0 commit comments

Comments
 (0)