Last try to get this reference counting right, I swear.
authorOwen Anderson <resistor@mac.com>
Tue, 9 Nov 2010 17:47:10 +0000 (17:47 +0000)
committerOwen Anderson <resistor@mac.com>
Tue, 9 Nov 2010 17:47:10 +0000 (17:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118589 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Attributes.cpp

index 37a217fc8c5a1a91f6fada3167b48d8178a32b93..477111a3ae8b427f3ad71c5465b5fb2068b78f07 100644 (file)
@@ -131,7 +131,7 @@ public:
   }
   void DropRef() {
     sys::SmartScopedLock<true> Lock(*ALMutex);
-    sys::cas_flag new_val = RefCount--;
+    sys::cas_flag new_val = --RefCount;
     if (new_val == 0)
       delete this;
   }