diff options
author | Owen Anderson <resistor@mac.com> | 2009-06-23 20:17:22 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-06-23 20:17:22 +0000 |
commit | 6f2c64d70aad5328a843a6f6a6547ada69ead33b (patch) | |
tree | 4daa65427ce630a0a020fb9ca1d426187ab98aa3 /include/llvm/Type.h | |
parent | dcee6847555373c6f352370042486ef904a3d55b (diff) | |
download | llvm-6f2c64d70aad5328a843a6f6a6547ada69ead33b.tar.gz llvm-6f2c64d70aad5328a843a6f6a6547ada69ead33b.tar.bz2 llvm-6f2c64d70aad5328a843a6f6a6547ada69ead33b.tar.xz |
Revert my last series of commits related to Timer and 64-bit atomics. Not all the targets
we care about are capable of supporting it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73993 91177308-0d34-0410-b5e6-96231b3b80d8
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 97d5043dc4..d439233d8c 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 int32_t RefCount; + mutable sys::cas_flag 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::AtomicIncrement32(&RefCount); + sys::AtomicIncrement(&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. - int32_t Count = sys::AtomicDecrement32(&RefCount); - if (Count == 0 && AbstractTypeUsers.empty()) + sys::cas_flag OldCount = sys::AtomicDecrement(&RefCount); + if (OldCount == 0 && AbstractTypeUsers.empty()) this->destroy(); } |