Fix weird class-size-being-different problems. At some level this is being caused...
authorOwen Anderson <resistor@mac.com>
Fri, 19 Jun 2009 00:48:22 +0000 (00:48 +0000)
committerOwen Anderson <resistor@mac.com>
Fri, 19 Jun 2009 00:48:22 +0000 (00:48 +0000)
included everywhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73745 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/System/Mutex.h
include/llvm/System/RWMutex.h

index 6f5614f701fe14dc63c00596a99cbf8ca2f1eebd..2a70ba013a0033dcbd96d8f82608912d42d261f1 100644 (file)
@@ -68,9 +68,7 @@ namespace llvm
     /// @name Platform Dependent Data
     /// @{
     private:
-#ifdef ENABLE_THREADS
       void* data_; ///< We don't know what the data will be
-#endif
 
     /// @}
     /// @name Do Not Implement
index 6a254b873a5340bedc95e21770ef2f88bc4ff855..aa5b0b946aadace3a06fcac04cba1f96701bbe23 100644 (file)
@@ -68,9 +68,7 @@ namespace llvm
     /// @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 @@ namespace llvm
     /// 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;
       }