Skip to content

Commit 50156f2

Browse files
committed
Address review comments
1 parent c7b91a9 commit 50156f2

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

lib/IRGen/GenEnum.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6675,6 +6675,8 @@ namespace {
66756675
public:
66766676
using EnumTypeInfoBase<Base>::Strategy;
66776677

6678+
/// \group Methods delegated to the EnumImplStrategy
6679+
66786680
unsigned getFixedExtraInhabitantCount(IRGenModule &IGM) const override {
66796681
return Strategy.getFixedExtraInhabitantCount(IGM);
66806682
}

lib/IRGen/GenType.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3044,7 +3044,7 @@ bool irgen::tryEmitDestroyUsingDeinit(IRGenFunction &IGF, Address address,
30443044
IsABIAccessible_t irgen::isTypeABIAccessibleIfFixedSize(IRGenModule &IGM,
30453045
CanType ty) {
30463046

3047-
// Copyable types currently are always fixed size.
3047+
// Copyable types currently are always ABI-accessible if they're fixed size.
30483048
if (!ty->isNoncopyable())
30493049
return IsABIAccessible;
30503050

@@ -3054,7 +3054,9 @@ IsABIAccessible_t irgen::isTypeABIAccessibleIfFixedSize(IRGenModule &IGM,
30543054
if (!nom || !nom->getValueTypeDestructor())
30553055
return IsABIAccessible;
30563056

3057-
if (IGM.getSILModule().isTypeMetadataAccessible(ty))
3057+
if (IGM.getSILModule().isTypeMetadataAccessible(ty) ||
3058+
IGM.getSILModule().lookUpMoveOnlyDeinit(nom,
3059+
false /*deserialize lazily*/))
30583060
return IsABIAccessible;
30593061

30603062
return IsNotABIAccessible;

lib/IRGen/TypeInfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ class TypeInfo {
211211
/// Almost all fixed-size types are currently ABI-accessible, although this would
212212
/// not be difficult to change (e.g. if we had an archetype size constraint
213213
/// that didn't say anything about triviality).
214-
/// The exception to this is non-copyable types, non-copyable types need to be
215-
/// able to call the metadata to get to the deinit and so their type metadata
214+
/// The exception to this is non-copyable types, which need to be able to call
215+
/// the metadata to get to the deinit and so their type metadata
216216
/// needs to be accessible.
217217
IsABIAccessible_t isABIAccessible() const {
218218
return IsABIAccessible_t(Bits.TypeInfo.ABIAccessible);

0 commit comments

Comments
 (0)