diff options
Diffstat (limited to 'include/llvm/Type.h')
-rw-r--r-- | include/llvm/Type.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/llvm/Type.h b/include/llvm/Type.h index d439233d8c05..97d5043dc416 100644 --- a/include/llvm/Type.h +++ b/include/llvm/Type.h @@ -103,7 +103,7 @@ private: /// has no AbstractTypeUsers, the type is deleted. This is only sensical for /// derived types. /// - mutable sys::cas_flag RefCount; + mutable int32_t RefCount; const Type *getForwardedTypeInternal() const; @@ -338,7 +338,7 @@ public: void addRef() const { assert(isAbstract() && "Cannot add a reference to a non-abstract type!"); - sys::AtomicIncrement(&RefCount); + sys::AtomicIncrement32(&RefCount); } void dropRef() const { @@ -347,8 +347,8 @@ public: // If this is the last PATypeHolder using this object, and there are no // PATypeHandles using it, the type is dead, delete it now. - sys::cas_flag OldCount = sys::AtomicDecrement(&RefCount); - if (OldCount == 0 && AbstractTypeUsers.empty()) + int32_t Count = sys::AtomicDecrement32(&RefCount); + if (Count == 0 && AbstractTypeUsers.empty()) this->destroy(); } |