Skip to content

Commit 853c0f5

Browse files
authored
Merge pull request swiftlang#29974 from nkcsgexi/53776566
ABIChecker: ignore accessors with forced static dispatch
2 parents b926250 + 71a73a9 commit 853c0f5

File tree

8 files changed

+284516
-280988
lines changed

8 files changed

+284516
-280988
lines changed

include/swift/AST/Decl.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4686,6 +4686,10 @@ class AbstractStorageDecl : public ValueDecl {
46864686
/// To ensure an accessor is always returned, use getSynthesizedAccessor().
46874687
AccessorDecl *getOpaqueAccessor(AccessorKind kind) const;
46884688

4689+
/// Collect all opaque accessors.
4690+
ArrayRef<AccessorDecl*>
4691+
getOpaqueAccessors(llvm::SmallVectorImpl<AccessorDecl*> &scratch) const;
4692+
46894693
/// Return an accessor that was written in source. Returns null if the
46904694
/// accessor was not explicitly defined by the user.
46914695
AccessorDecl *getParsedAccessor(AccessorKind kind) const;

lib/AST/Decl.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2225,6 +2225,12 @@ AccessorDecl *AbstractStorageDecl::getOpaqueAccessor(AccessorKind kind) const {
22252225
return getSynthesizedAccessor(kind);
22262226
}
22272227

2228+
ArrayRef<AccessorDecl*> AbstractStorageDecl::getOpaqueAccessors(
2229+
llvm::SmallVectorImpl<AccessorDecl*> &scratch) const {
2230+
visitOpaqueAccessors([&](AccessorDecl *D) { scratch.push_back(D); });
2231+
return scratch;
2232+
}
2233+
22282234
bool AbstractStorageDecl::hasParsedAccessors() const {
22292235
for (auto *accessor : getAllAccessors())
22302236
if (!accessor->isImplicit())

test/api-digester/Outputs/Cake-abi.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ cake: Accessor RemoveSetters.Value.Modify() has been removed
1212
cake: Accessor RemoveSetters.Value.Set() has been removed
1313
cake: Accessor RemoveSetters.subscript(_:).Modify() has been removed
1414
cake: Accessor RemoveSetters.subscript(_:).Set() has been removed
15-
cake: Accessor fixedLayoutStruct.height.Read() has been removed
1615
cake: AssociatedType RequiementChanges.removedType has been removed
1716
cake: Class C3 has been removed
1817
cake: Constructor Somestruct2.init(_:) has been removed
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
Func _collectReferencesInsideObject(_:) is a new API without @available attribute
2-
Func _loadDestroyTLSCounter() is a new API without @available attribute
3-
Protocol _RuntimeFunctionCountersStats is a new API without @available attribute
4-
Struct _GlobalRuntimeFunctionCountersState is a new API without @available attribute
5-
Struct _ObjectRuntimeFunctionCountersState is a new API without @available attribute
6-
Struct _RuntimeFunctionCounters is a new API without @available attribute
7-
Func _measureRuntimeFunctionCountersDiffs(objects:_:) is a new API without @available attribute
1+
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
Class _SwiftNSMutableArray is a new API without @available attribute
2-
Class _SwiftNativeNSMutableArray is a new API without @available attribute
1+

0 commit comments

Comments
 (0)