aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-06-21 20:17:03 +0000
committerDan Gohman <gohman@apple.com>2008-06-21 20:17:03 +0000
commit933e51c5e3b9db7b0deebcbca387c86cb3b7cb3b (patch)
tree6c3e96c81489379a7728ee0290099d3bd98f265e
parent629c1a3f78494d0dd769fe82bd2bd17df0555843 (diff)
downloadexternal_llvm-933e51c5e3b9db7b0deebcbca387c86cb3b7cb3b.zip
external_llvm-933e51c5e3b9db7b0deebcbca387c86cb3b7cb3b.tar.gz
external_llvm-933e51c5e3b9db7b0deebcbca387c86cb3b7cb3b.tar.bz2
Use static_cast instead of reinterpret_cast for casting void*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52592 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/ExecutionEngine/JIT/JITMemoryManager.cpp2
-rw-r--r--lib/System/Mutex.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/ExecutionEngine/JIT/JITMemoryManager.cpp b/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
index b07af2e..4cbfcf9 100644
--- a/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
+++ b/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
@@ -369,7 +369,7 @@ DefaultJITMemoryManager::DefaultJITMemoryManager() {
// Allocate a 16M block of memory for functions.
sys::MemoryBlock MemBlock = getNewMemoryBlock(16 << 20);
- unsigned char *MemBase = reinterpret_cast<unsigned char*>(MemBlock.base());
+ unsigned char *MemBase = static_cast<unsigned char*>(MemBlock.base());
// Allocate stubs backwards from the base, allocate functions forward
// from the base.
diff --git a/lib/System/Mutex.cpp b/lib/System/Mutex.cpp
index 3bef7ce..81dcd3b 100644
--- a/lib/System/Mutex.cpp
+++ b/lib/System/Mutex.cpp
@@ -98,7 +98,7 @@ Mutex::~Mutex()
{
if (pthread_enabled)
{
- pthread_mutex_t* mutex = reinterpret_cast<pthread_mutex_t*>(data_);
+ pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_);
assert(mutex != 0);
pthread_mutex_destroy(mutex);
assert(mutex != 0);
@@ -110,7 +110,7 @@ Mutex::acquire()
{
if (pthread_enabled)
{
- pthread_mutex_t* mutex = reinterpret_cast<pthread_mutex_t*>(data_);
+ pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_);
assert(mutex != 0);
int errorcode = pthread_mutex_lock(mutex);
@@ -124,7 +124,7 @@ Mutex::release()
{
if (pthread_enabled)
{
- pthread_mutex_t* mutex = reinterpret_cast<pthread_mutex_t*>(data_);
+ pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_);
assert(mutex != 0);
int errorcode = pthread_mutex_unlock(mutex);
@@ -138,7 +138,7 @@ Mutex::tryacquire()
{
if (pthread_enabled)
{
- pthread_mutex_t* mutex = reinterpret_cast<pthread_mutex_t*>(data_);
+ pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_);
assert(mutex != 0);
int errorcode = pthread_mutex_trylock(mutex);