@@ -383,7 +383,7 @@ class RefCountBitsT {
383383 // (for example, because UseSlowRC is set
384384 // or because the refcount is now zero and should deinit).
385385 template <ClearPinnedFlag clearPinnedFlag>
386- LLVM_ATTRIBUTE_ALWAYS_INLINE LLVM_ATTRIBUTE_UNUSED_RESULT
386+ LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE
387387 bool doDecrementStrongExtraRefCount (uint32_t dec) {
388388#ifndef NDEBUG
389389 if (!hasSideTable ()) {
@@ -544,7 +544,7 @@ class RefCountBitsT {
544544 // Returns true if the increment is a fast-path result.
545545 // Returns false if the increment should fall back to some slow path
546546 // (for example, because UseSlowRC is set or because the refcount overflowed).
547- LLVM_ATTRIBUTE_ALWAYS_INLINE LLVM_ATTRIBUTE_UNUSED_RESULT
547+ LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE
548548 bool incrementStrongExtraRefCount (uint32_t inc) {
549549 // This deliberately overflows into the UseSlowRC field.
550550 bits += BitsType (inc) << Offsets::StrongExtraRefCountShift;
@@ -553,7 +553,7 @@ class RefCountBitsT {
553553
554554 // FIXME: I don't understand why I can't make clearPinned a template argument
555555 // (compiler balks at calls from class RefCounts that way)
556- LLVM_ATTRIBUTE_ALWAYS_INLINE LLVM_ATTRIBUTE_UNUSED_RESULT
556+ LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE
557557 bool decrementStrongExtraRefCount (uint32_t dec, bool clearPinned = false ) {
558558 if (clearPinned)
559559 return doDecrementStrongExtraRefCount<DoClearPinnedFlag>(dec);
@@ -1275,7 +1275,7 @@ class HeapObjectSideTableEntry {
12751275
12761276 // WEAK
12771277
1278- LLVM_ATTRIBUTE_UNUSED_RESULT
1278+ LLVM_NODISCARD
12791279 HeapObjectSideTableEntry* incrementWeak () {
12801280 // incrementWeak need not be atomic w.r.t. concurrent deinit initiation.
12811281 // The client can't actually get a reference to the object without
0 commit comments