File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ class LinkEntity {
132
132
// / ValueDecl*, SILFunction*, or TypeBase*, depending on Kind.
133
133
void *Pointer;
134
134
135
- // / ProtocolConformance*, depending on Kind.
135
+ // / ProtocolConformance* or SILDifferentiabilityWitness* , depending on Kind.
136
136
void *SecondaryPointer;
137
137
138
138
// / A hand-rolled bitfield with the following layout:
@@ -772,8 +772,8 @@ class LinkEntity {
772
772
void
773
773
setForDifferentiabilityWitness (Kind kind,
774
774
const SILDifferentiabilityWitness *witness) {
775
- Pointer = const_cast < void *>( static_cast < const void *>(witness)) ;
776
- SecondaryPointer = nullptr ;
775
+ Pointer = nullptr ;
776
+ SecondaryPointer = const_cast < void *>( static_cast < const void *>(witness)) ;
777
777
Data = LINKENTITY_SET_FIELD (Kind, unsigned (kind));
778
778
}
779
779
@@ -1684,7 +1684,7 @@ class LinkEntity {
1684
1684
1685
1685
SILDifferentiabilityWitness *getSILDifferentiabilityWitness () const {
1686
1686
assert (getKind () == Kind::DifferentiabilityWitness);
1687
- return reinterpret_cast <SILDifferentiabilityWitness *>(Pointer );
1687
+ return reinterpret_cast <SILDifferentiabilityWitness *>(SecondaryPointer );
1688
1688
}
1689
1689
1690
1690
const RootProtocolConformance *getRootProtocolConformance () const {
Original file line number Diff line number Diff line change @@ -1449,7 +1449,7 @@ bool IRGenModule::IsWellKnownBuiltinOrStructralType(CanType T) const {
1449
1449
T == Context.getAnyObjectType ())
1450
1450
return true ;
1451
1451
1452
- if (auto IntTy = dyn_cast <BuiltinIntegerType>(T)) {
1452
+ if (auto IntTy = dyn_cast_or_null <BuiltinIntegerType>(T)) {
1453
1453
auto Width = IntTy->getWidth ();
1454
1454
if (Width.isPointerWidth ())
1455
1455
return true ;
You can’t perform that action at this time.
0 commit comments