Skip to content

Commit 6c1a2df

Browse files
committed
IRGen: LinkEntity::Kind::DifferentiabilityWitness is not a type kind
As the above comments imply, when isTypeKind() returns true, then getType() should return a valid Type. This wasn't true with DifferentiabilityWitness.
1 parent 61e418c commit 6c1a2df

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/swift/IRGen/Linking.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,10 @@ class LinkEntity {
450450
// These are both type kinds and protocol-conformance kinds.
451451
// TYPE KINDS: BEGIN {{
452452

453+
/// A SIL differentiability witness. The pointer is a
454+
/// SILDifferentiabilityWitness*.
455+
DifferentiabilityWitness,
456+
453457
/// A lazy protocol witness accessor function. The pointer is a
454458
/// canonical TypeBase*, and the secondary pointer is a
455459
/// ProtocolConformance*.
@@ -460,10 +464,6 @@ class LinkEntity {
460464
/// ProtocolConformance*.
461465
ProtocolWitnessTableLazyCacheVariable,
462466

463-
/// A SIL differentiability witness. The pointer is a
464-
/// SILDifferentiabilityWitness*.
465-
DifferentiabilityWitness,
466-
467467
// Everything following this is a type kind.
468468

469469
/// A value witness for a type.

0 commit comments

Comments
 (0)