@@ -383,7 +383,7 @@ class RefCountBitsT {
383
383
// (for example, because UseSlowRC is set
384
384
// or because the refcount is now zero and should deinit).
385
385
template <ClearPinnedFlag clearPinnedFlag>
386
- LLVM_ATTRIBUTE_ALWAYS_INLINE LLVM_ATTRIBUTE_UNUSED_RESULT
386
+ LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE
387
387
bool doDecrementStrongExtraRefCount (uint32_t dec) {
388
388
#ifndef NDEBUG
389
389
if (!hasSideTable ()) {
@@ -544,7 +544,7 @@ class RefCountBitsT {
544
544
// Returns true if the increment is a fast-path result.
545
545
// Returns false if the increment should fall back to some slow path
546
546
// (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
548
548
bool incrementStrongExtraRefCount (uint32_t inc) {
549
549
// This deliberately overflows into the UseSlowRC field.
550
550
bits += BitsType (inc) << Offsets::StrongExtraRefCountShift;
@@ -553,7 +553,7 @@ class RefCountBitsT {
553
553
554
554
// FIXME: I don't understand why I can't make clearPinned a template argument
555
555
// (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
557
557
bool decrementStrongExtraRefCount (uint32_t dec, bool clearPinned = false ) {
558
558
if (clearPinned)
559
559
return doDecrementStrongExtraRefCount<DoClearPinnedFlag>(dec);
@@ -1275,7 +1275,7 @@ class HeapObjectSideTableEntry {
1275
1275
1276
1276
// WEAK
1277
1277
1278
- LLVM_ATTRIBUTE_UNUSED_RESULT
1278
+ LLVM_NODISCARD
1279
1279
HeapObjectSideTableEntry* incrementWeak () {
1280
1280
// incrementWeak need not be atomic w.r.t. concurrent deinit initiation.
1281
1281
// The client can't actually get a reference to the object without
0 commit comments