Skip to content

Commit 3039fb3

Browse files
committed
Eliminate now-unused (Literal)(Target)ProtocolDescriptorList.
These were used to encode the “inherited protocols” for Objective-C Protocol structures. These are no longer a part of either Swift protocol descriptors or the part of Objective-C Protocol structures that the Swift runtime inspects.
1 parent e7998f1 commit 3039fb3

File tree

1 file changed

+0
-53
lines changed

1 file changed

+0
-53
lines changed

include/swift/ABI/Metadata.h

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1736,59 +1736,6 @@ class TargetProtocolDescriptorRef {
17361736

17371737
using ProtocolDescriptorRef = TargetProtocolDescriptorRef<InProcess>;
17381738

1739-
1740-
/// An array of protocol descriptors with a header and tail-allocated elements.
1741-
template <typename Runtime>
1742-
struct TargetProtocolDescriptorList {
1743-
using StoredPointer = typename Runtime::StoredPointer;
1744-
StoredPointer NumProtocols;
1745-
1746-
ConstTargetMetadataPointer<Runtime, TargetProtocolDescriptor> *
1747-
getProtocols() {
1748-
return reinterpret_cast<
1749-
ConstTargetMetadataPointer<
1750-
Runtime, TargetProtocolDescriptor> *>(this + 1);
1751-
}
1752-
1753-
ConstTargetMetadataPointer<Runtime, TargetProtocolDescriptor> const *
1754-
getProtocols() const {
1755-
return reinterpret_cast<
1756-
ConstTargetMetadataPointer<
1757-
Runtime, TargetProtocolDescriptor> const *>(this + 1);
1758-
}
1759-
1760-
ConstTargetMetadataPointer<Runtime, TargetProtocolDescriptor> const &
1761-
operator[](size_t i) const {
1762-
return getProtocols()[i];
1763-
}
1764-
1765-
ConstTargetMetadataPointer<Runtime, TargetProtocolDescriptor> &
1766-
operator[](size_t i) {
1767-
return getProtocols()[i];
1768-
}
1769-
1770-
constexpr TargetProtocolDescriptorList() : NumProtocols(0) {}
1771-
1772-
protected:
1773-
constexpr TargetProtocolDescriptorList(StoredPointer NumProtocols)
1774-
: NumProtocols(NumProtocols) {}
1775-
};
1776-
using ProtocolDescriptorList = TargetProtocolDescriptorList<InProcess>;
1777-
1778-
/// A literal class for creating constant protocol descriptors in the runtime.
1779-
template<typename Runtime, uintptr_t NUM_PROTOCOLS>
1780-
struct TargetLiteralProtocolDescriptorList
1781-
: TargetProtocolDescriptorList<Runtime> {
1782-
const TargetProtocolDescriptorList<Runtime> *Protocols[NUM_PROTOCOLS];
1783-
1784-
template<typename...DescriptorPointers>
1785-
constexpr TargetLiteralProtocolDescriptorList(DescriptorPointers...elements)
1786-
: TargetProtocolDescriptorList<Runtime>(NUM_PROTOCOLS),
1787-
Protocols{elements...}
1788-
{}
1789-
};
1790-
using LiteralProtocolDescriptorList = TargetProtocolDescriptorList<InProcess>;
1791-
17921739
/// A protocol requirement descriptor. This describes a single protocol
17931740
/// requirement in a protocol descriptor. The index of the requirement in
17941741
/// the descriptor determines the offset of the witness in a witness table

0 commit comments

Comments
 (0)