Skip to content

Commit 445307b

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 8ba60da commit 445307b

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
@@ -3889,6 +3889,7 @@ class DeclDeserializer {
38893889

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

0 commit comments

Comments
 (0)