Atomic ops that do arithmetic use signed arithmetic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73980 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson
2009-06-23 18:30:27 +00:00
parent 8756a8db5b
commit f43f9d0ef8
4 changed files with 12 additions and 12 deletions

View File

@@ -103,7 +103,7 @@ private:
/// has no AbstractTypeUsers, the type is deleted. This is only sensical for
/// derived types.
///
mutable uint32_t RefCount;
mutable int32_t RefCount;
const Type *getForwardedTypeInternal() const;
@@ -347,7 +347,7 @@ public:
// If this is the last PATypeHolder using this object, and there are no
// PATypeHandles using it, the type is dead, delete it now.
uint32_t Count = sys::AtomicDecrement32(&RefCount);
int32_t Count = sys::AtomicDecrement32(&RefCount);
if (Count == 0 && AbstractTypeUsers.empty())
this->destroy();
}