parent
							
								
									d4ce0a1597
								
							
						
					
					
						commit
						ffea0abe81
					
				| 
						 | 
					@ -12,6 +12,7 @@
 | 
				
			||||||
//===----------------------------------------------------------------------===//
 | 
					//===----------------------------------------------------------------------===//
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "llvm/Config/config.h"
 | 
					#include "llvm/Config/config.h"
 | 
				
			||||||
 | 
					#include "llvm/Support/Compiler.h"
 | 
				
			||||||
#include "llvm/System/RWMutex.h"
 | 
					#include "llvm/System/RWMutex.h"
 | 
				
			||||||
#include <cstring>
 | 
					#include <cstring>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -72,8 +73,7 @@ RWMutexImpl::RWMutexImpl()
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Initialize the rwlock
 | 
					    // Initialize the rwlock
 | 
				
			||||||
    int errorcode = pthread_rwlock_init(rwlock, NULL);
 | 
					    int ATTRIBUTE_UNUSED errorcode = pthread_rwlock_init(rwlock, NULL);
 | 
				
			||||||
    (void)errorcode;
 | 
					 | 
				
			||||||
    assert(errorcode == 0);
 | 
					    assert(errorcode == 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Assign the data member
 | 
					    // Assign the data member
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -17,6 +17,7 @@
 | 
				
			||||||
//===----------------------------------------------------------------------===//
 | 
					//===----------------------------------------------------------------------===//
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "Win32.h"
 | 
					#include "Win32.h"
 | 
				
			||||||
 | 
					#include "llvm/Support/Compiler.h"
 | 
				
			||||||
#include "llvm/System/ThreadLocal.h"
 | 
					#include "llvm/System/ThreadLocal.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace llvm {
 | 
					namespace llvm {
 | 
				
			||||||
| 
						 | 
					@ -42,9 +43,8 @@ const void* ThreadLocalImpl::getInstance() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void ThreadLocalImpl::setInstance(const void* d){
 | 
					void ThreadLocalImpl::setInstance(const void* d){
 | 
				
			||||||
  DWORD* tls = static_cast<DWORD*>(data);
 | 
					  DWORD* tls = static_cast<DWORD*>(data);
 | 
				
			||||||
  int errorcode = TlsSetValue(*tls, const_cast<void*>(d));
 | 
					  int ATTRIBUTE_UNUSED errorcode = TlsSetValue(*tls, const_cast<void*>(d));
 | 
				
			||||||
  assert(errorcode != 0);
 | 
					  assert(errorcode != 0);
 | 
				
			||||||
  (void)errorcode;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void ThreadLocalImpl::removeInstance() {
 | 
					void ThreadLocalImpl::removeInstance() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue