diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-06-23 19:31:59 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-23 19:31:59 +0000 |
commit | f76359690a7035ad21498f2ba6be6991d3b2032d (patch) | |
tree | 2db4127ea6c69f2548de6981658579fddd794448 /include/llvm/Type.h | |
parent | 0408e1d309a743aca4ed4592cf2c712a71537901 (diff) |
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(); } |