@@ -438,8 +438,8 @@ class ASTExtInfoBuilder {
438
438
// If bits are added or removed, then TypeBase::NumAFTExtInfoBits
439
439
// and NumMaskBits must be updated, and they must match.
440
440
//
441
- // |representation|noEscape|concurrent|async|throws|isolation|differentiability| TransferringResult |
442
- // | 0 .. 3 | 4 | 5 | 6 | 7 | 8 .. 10 | 11 .. 13 | 14 |
441
+ // |representation|noEscape|concurrent|async|throws|isolation|differentiability| SendingResult |
442
+ // | 0 .. 3 | 4 | 5 | 6 | 7 | 8 .. 10 | 11 .. 13 | 14 |
443
443
//
444
444
enum : unsigned {
445
445
RepresentationMask = 0xF << 0 ,
@@ -451,7 +451,7 @@ class ASTExtInfoBuilder {
451
451
IsolationMask = 0x7 << IsolationMaskOffset,
452
452
DifferentiabilityMaskOffset = 11 ,
453
453
DifferentiabilityMask = 0x7 << DifferentiabilityMaskOffset,
454
- TransferringResultMask = 1 << 14 ,
454
+ SendingResultMask = 1 << 14 ,
455
455
NumMaskBits = 15
456
456
};
457
457
@@ -501,14 +501,14 @@ class ASTExtInfoBuilder {
501
501
Type thrownError, DifferentiabilityKind diffKind,
502
502
const clang::Type *type, FunctionTypeIsolation isolation,
503
503
LifetimeDependenceInfo lifetimeDependenceInfo,
504
- bool transferringResult )
504
+ bool sendingResult )
505
505
: ASTExtInfoBuilder(
506
506
((unsigned )rep) | (isNoEscape ? NoEscapeMask : 0 ) |
507
507
(throws ? ThrowsMask : 0 ) |
508
508
(((unsigned )diffKind << DifferentiabilityMaskOffset) &
509
509
DifferentiabilityMask) |
510
510
(unsigned (isolation.getKind()) << IsolationMaskOffset) |
511
- (transferringResult ? TransferringResultMask : 0 ),
511
+ (sendingResult ? SendingResultMask : 0 ),
512
512
ClangTypeInfo(type), isolation.getOpaqueType(), thrownError,
513
513
lifetimeDependenceInfo) {}
514
514
@@ -530,9 +530,7 @@ class ASTExtInfoBuilder {
530
530
531
531
constexpr bool isThrowing () const { return bits & ThrowsMask; }
532
532
533
- constexpr bool hasTransferringResult () const {
534
- return bits & TransferringResultMask;
535
- }
533
+ constexpr bool hasSendingResult () const { return bits & SendingResultMask; }
536
534
537
535
constexpr DifferentiabilityKind getDifferentiabilityKind () const {
538
536
return DifferentiabilityKind ((bits & DifferentiabilityMask) >>
@@ -644,12 +642,10 @@ class ASTExtInfoBuilder {
644
642
return withThrows (true , Type ());
645
643
}
646
644
647
- [[nodiscard]] ASTExtInfoBuilder
648
- withTransferringResult (bool transferring = true ) const {
649
- return ASTExtInfoBuilder (transferring ? (bits | TransferringResultMask)
650
- : (bits & ~TransferringResultMask),
651
- clangTypeInfo, globalActor, thrownError,
652
- lifetimeDependenceInfo);
645
+ [[nodiscard]] ASTExtInfoBuilder withSendingResult (bool sending = true ) const {
646
+ return ASTExtInfoBuilder (
647
+ sending ? (bits | SendingResultMask) : (bits & ~SendingResultMask),
648
+ clangTypeInfo, globalActor, thrownError, lifetimeDependenceInfo);
653
649
}
654
650
655
651
[[nodiscard]]
@@ -765,9 +761,7 @@ class ASTExtInfo {
765
761
766
762
constexpr bool isThrowing () const { return builder.isThrowing (); }
767
763
768
- constexpr bool hasTransferringResult () const {
769
- return builder.hasTransferringResult ();
770
- }
764
+ constexpr bool hasSendingResult () const { return builder.hasSendingResult (); }
771
765
772
766
constexpr DifferentiabilityKind getDifferentiabilityKind () const {
773
767
return builder.getDifferentiabilityKind ();
@@ -838,9 +832,8 @@ class ASTExtInfo {
838
832
return builder.withAsync (async).build ();
839
833
}
840
834
841
- [[nodiscard]] ASTExtInfo
842
- withTransferringResult (bool transferring = true ) const {
843
- return builder.withTransferringResult (transferring).build ();
835
+ [[nodiscard]] ASTExtInfo withSendingResult (bool sending = true ) const {
836
+ return builder.withSendingResult (sending).build ();
844
837
}
845
838
846
839
[[nodiscard]]
0 commit comments