Skip to content

Commit

Permalink
[Runtime] TargetProtocolDescriptor is not a TrailingGenericContextObj…
Browse files Browse the repository at this point in the history
…ects.

Protocols are never generic, so don't inherit from
TrailingGenericContextObjects. Instead, directly use
swift::ABI::TrailingObjects. Since protocols are never generic, this
doesn't actually affect layout at all; it's cleanup.
  • Loading branch information
DougGregor committed Jul 24, 2018
1 parent 3039fb3 commit 191db1e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions include/swift/ABI/Metadata.h
Expand Up @@ -2891,17 +2891,15 @@ struct TargetAnonymousContextDescriptor final
template<typename Runtime>
struct TargetProtocolDescriptor final
: TargetContextDescriptor<Runtime>,
TrailingGenericContextObjects<
swift::ABI::TrailingObjects<
TargetProtocolDescriptor<Runtime>,
TargetGenericContextDescriptorHeader,
TargetGenericRequirementDescriptor<Runtime>,
TargetProtocolRequirement<Runtime>>
{
private:
using TrailingObjects
= TrailingGenericContextObjects<
= swift::ABI::TrailingObjects<
TargetProtocolDescriptor<Runtime>,
TargetGenericContextDescriptorHeader,
TargetGenericRequirementDescriptor<Runtime>,
TargetProtocolRequirement<Runtime>>;

Expand All @@ -2911,9 +2909,6 @@ struct TargetProtocolDescriptor final
using OverloadToken = typename TrailingObjects::template OverloadToken<T>;

public:
using TrailingObjects::getGenericContext;
using TrailingObjects::numTrailingObjects;

size_t numTrailingObjects(
OverloadToken<TargetGenericRequirementDescriptor<Runtime>>) const {
return NumRequirementsInSignature;
Expand Down

0 comments on commit 191db1e

Please sign in to comment.