[llvm-commits] [llvm] r73745 - in /llvm/trunk/include/llvm/System: Mutex.h RWMutex.h

Owen Anderson resistor at mac.com
Thu Jun 18 17:48:22 PDT 2009


Author: resistor
Date: Thu Jun 18 19:48:22 2009
New Revision: 73745

URL: http://llvm.org/viewvc/llvm-project?rev=73745&view=rev
Log:
Fix weird class-size-being-different problems.  At some level this is being caused by config.h not being
included everywhere.

Modified:
    llvm/trunk/include/llvm/System/Mutex.h
    llvm/trunk/include/llvm/System/RWMutex.h

Modified: llvm/trunk/include/llvm/System/Mutex.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/System/Mutex.h?rev=73745&r1=73744&r2=73745&view=diff

==============================================================================
--- llvm/trunk/include/llvm/System/Mutex.h (original)
+++ llvm/trunk/include/llvm/System/Mutex.h Thu Jun 18 19:48:22 2009
@@ -68,9 +68,7 @@
     /// @name Platform Dependent Data
     /// @{
     private:
-#ifdef ENABLE_THREADS
       void* data_; ///< We don't know what the data will be
-#endif
 
     /// @}
     /// @name Do Not Implement

Modified: llvm/trunk/include/llvm/System/RWMutex.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/System/RWMutex.h?rev=73745&r1=73744&r2=73745&view=diff

==============================================================================
--- llvm/trunk/include/llvm/System/RWMutex.h (original)
+++ llvm/trunk/include/llvm/System/RWMutex.h Thu Jun 18 19:48:22 2009
@@ -68,9 +68,7 @@
     /// @name Platform Dependent Data
     /// @{
     private:
-#ifdef ENABLE_THREADS
       void* data_; ///< We don't know what the data will be
-#endif
 
     /// @}
     /// @name Do Not Implement
@@ -85,12 +83,12 @@
     /// indicates whether this mutex should become a no-op when we're not
     /// running in multithreaded mode.
     template<bool mt_only>
-    class SmartRWMutex : RWMutexImpl {
+    class SmartRWMutex : public RWMutexImpl {
     public:
       explicit SmartRWMutex() : RWMutexImpl() { }
       
       bool reader_acquire() {
-        if (!mt_only && llvm_is_multithreaded())
+        if (!mt_only || llvm_is_multithreaded())
           return RWMutexImpl::reader_acquire();
         return true;
       }





More information about the llvm-commits mailing list