Skip to content

Commit b627eb1

Browse files
committed
SIL: Add resilience expansion parameter to SILModule::isTypeABIAccessible()
1 parent d2ffb89 commit b627eb1

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

include/swift/SIL/SILModule.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,10 @@ class SILModule {
598598

599599
/// Can value operations (copies and destroys) on the given lowered type
600600
/// be performed in this module?
601-
bool isTypeABIAccessible(SILType type);
601+
// FIXME: Expansion
602+
bool isTypeABIAccessible(SILType type,
603+
ResilienceExpansion forExpansion
604+
= ResilienceExpansion::Minimal);
602605

603606
/// Can type metadata for the given formal type be fetched in
604607
/// the given module?

lib/SIL/SIL.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,10 @@ static bool isTypeMetadataForLayoutAccessible(SILModule &M, SILType type) {
185185
/// that are ABI-private to their defining module. But if the type is not
186186
/// ABI-private, we can always at least fetch its metadata and use the
187187
/// value witness table stored there.
188-
bool SILModule::isTypeABIAccessible(SILType type) {
188+
bool SILModule::isTypeABIAccessible(SILType type,
189+
ResilienceExpansion forExpansion) {
189190
// Fixed-ABI types can have value operations done without metadata.
190-
if (Types.getTypeLowering(type).isFixedABI())
191+
if (Types.getTypeLowering(type, forExpansion).isFixedABI())
191192
return true;
192193

193194
assert(!type.is<ReferenceStorageType>() &&

0 commit comments

Comments
 (0)