Skip to content

Commit 48680a8

Browse files
committed
[Serialization] Always read opaque type underlying types in merge-module
When reading a swiftmodule that's part of the main module the compiler should have access to all internal details. In that case, read the underlying type to opaque types. This was caught by `SILOptimizer/specialize_opaque_result_types2.sil` which has a merge-module like behavior reading it sib files as input.
1 parent f7fec02 commit 48680a8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/Serialization/Deserialization.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3891,6 +3891,7 @@ class DeclDeserializer {
38913891

38923892
auto *AFD = dyn_cast<AbstractFunctionDecl>(namingDecl);
38933893
if (MF.getResilienceStrategy() == ResilienceStrategy::Resilient &&
3894+
!MF.FileContext->getParentModule()->isMainModule() &&
38943895
AFD && AFD->getResilienceExpansion() != ResilienceExpansion::Minimal) {
38953896
// Do not try to read the underlying type information if the function
38963897
// is not inlinable in clients. This reflects the swiftinterface behavior

0 commit comments

Comments
 (0)