@@ -187,7 +187,7 @@ struct SILDeclRef {
187187 // / True if this references a foreign entry point for the referenced decl.
188188 unsigned isForeign : 1 ;
189189 // / True if this references a distributed function.
190- unsigned isDistributed : 1 ;
190+ unsigned distributedThunk : 1 ;
191191 // / True if this references a distributed function, but it is known to be local
192192 unsigned isKnownToBeLocal : 1 ;
193193 // / True is this reference to function that could be looked up via a special
@@ -231,7 +231,7 @@ struct SILDeclRef {
231231
232232 // / Produces a null SILDeclRef.
233233 SILDeclRef ()
234- : loc(), kind(Kind::Func), isForeign(0 ), isDistributed (0 ),
234+ : loc(), kind(Kind::Func), isForeign(0 ), distributedThunk (0 ),
235235 isKnownToBeLocal (0 ), isRuntimeAccessible(0 ),
236236 backDeploymentKind(BackDeploymentKind::None), defaultArgIndex(0 ),
237237 isAsyncLetClosure(0 ) {}
@@ -406,13 +406,13 @@ struct SILDeclRef {
406406 friend llvm::hash_code hash_value (const SILDeclRef &ref) {
407407 return llvm::hash_combine (
408408 ref.loc .getOpaqueValue (), static_cast <int >(ref.kind ), ref.isForeign ,
409- ref.isDistributed , ref.defaultArgIndex , ref.isAsyncLetClosure );
409+ ref.distributedThunk , ref.defaultArgIndex , ref.isAsyncLetClosure );
410410 }
411411
412412 bool operator ==(SILDeclRef rhs) const {
413413 return loc.getOpaqueValue () == rhs.loc .getOpaqueValue () &&
414414 kind == rhs.kind && isForeign == rhs.isForeign &&
415- isDistributed == rhs.isDistributed &&
415+ distributedThunk == rhs.distributedThunk &&
416416 backDeploymentKind == rhs.backDeploymentKind &&
417417 defaultArgIndex == rhs.defaultArgIndex && pointer == rhs.pointer &&
418418 isAsyncLetClosure == rhs.isAsyncLetClosure ;
@@ -468,7 +468,7 @@ struct SILDeclRef {
468468
469469 // / Returns a copy of the decl with the given back deployment kind.
470470 SILDeclRef asBackDeploymentKind (BackDeploymentKind backDeploymentKind) const {
471- return SILDeclRef (loc.getOpaqueValue (), kind, isForeign, isDistributed ,
471+ return SILDeclRef (loc.getOpaqueValue (), kind, isForeign, distributedThunk ,
472472 isKnownToBeLocal, isRuntimeAccessible, backDeploymentKind,
473473 defaultArgIndex, isAsyncLetClosure,
474474 pointer.get <AutoDiffDerivativeFunctionIdentifier *>());
@@ -511,6 +511,9 @@ struct SILDeclRef {
511511 // / True if the decl ref references a thunk handling potentially distributed actor functions
512512 bool isDistributedThunk () const ;
513513
514+ // / True if the decl references a 'distributed' function.
515+ bool isDistributed () const ;
516+
514517 // / True if the decl ref references a thunk handling a call to a function that
515518 // / supports back deployment.
516519 bool isBackDeploymentThunk () const ;
@@ -605,13 +608,13 @@ struct SILDeclRef {
605608 friend struct llvm ::DenseMapInfo<swift::SILDeclRef>;
606609 // / Produces a SILDeclRef from an opaque value.
607610 explicit SILDeclRef (void *opaqueLoc, Kind kind, bool isForeign,
608- bool isDistributed , bool isKnownToBeLocal,
611+ bool isDistributedThunk , bool isKnownToBeLocal,
609612 bool isRuntimeAccessible,
610613 BackDeploymentKind backDeploymentKind,
611614 unsigned defaultArgIndex, bool isAsyncLetClosure,
612615 AutoDiffDerivativeFunctionIdentifier *derivativeId)
613616 : loc(Loc::getFromOpaqueValue(opaqueLoc)), kind(kind),
614- isForeign(isForeign), isDistributed(isDistributed ),
617+ isForeign(isForeign), distributedThunk(isDistributedThunk ),
615618 isKnownToBeLocal(isKnownToBeLocal),
616619 isRuntimeAccessible(isRuntimeAccessible),
617620 backDeploymentKind(backDeploymentKind),
@@ -655,7 +658,7 @@ template<> struct DenseMapInfo<swift::SILDeclRef> {
655658 : 0 ;
656659 unsigned h4 = UnsignedInfo::getHashValue (Val.isForeign );
657660 unsigned h5 = PointerInfo::getHashValue (Val.pointer .getOpaqueValue ());
658- unsigned h6 = UnsignedInfo::getHashValue (Val.isDistributed );
661+ unsigned h6 = UnsignedInfo::getHashValue (Val.distributedThunk );
659662 unsigned h7 = UnsignedInfo::getHashValue (unsigned (Val.backDeploymentKind ));
660663 unsigned h8 = UnsignedInfo::getHashValue (Val.isKnownToBeLocal );
661664 unsigned h9 = UnsignedInfo::getHashValue (Val.isRuntimeAccessible );
0 commit comments