We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents acbae0c + c0b612c commit c7429f0Copy full SHA for c7429f0
lib/IRGen/MetadataRequest.cpp
@@ -836,6 +836,12 @@ bool irgen::isSpecializedNominalTypeMetadataStaticallyAddressable(
836
if (IGM.getSwiftModule() == nominal->getModuleContext()) {
837
return false;
838
}
839
+ // We cannot reference the type context across the module boundary on
840
+ // PE/COFF without a load. This prevents us from statically initializing the
841
+ // pattern.
842
+ if (IGM.Triple.isOSWindows() &&
843
+ !nominal->getModuleContext()->isStaticLibrary())
844
+ return false;
845
if (nominal->isResilient(IGM.getSwiftModule(),
846
ResilienceExpansion::Maximal)) {
847
0 commit comments