summaryrefslogtreecommitdiffstats
path: root/llvm
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
commit1cf5af9e428e6d18d8782d67c73dc7d113a0b44f (patch)
tree550939938c452e7ffe5209c8d0b493367bc30d5c /llvm
parent8459e0bc5951d2eb2b394be74865c82ccad6834f (diff)
downloadbcm5719-llvm-1cf5af9e428e6d18d8782d67c73dc7d113a0b44f.tar.gz
bcm5719-llvm-1cf5af9e428e6d18d8782d67c73dc7d113a0b44f.zip
Use static_cast instead of reinterpret_cast for casting void*.
llvm-svn: 52592
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp2
-rw-r--r--llvm/lib/System/Mutex.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp b/llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
index b07af2e11dd..4cbfcf9e518 100644
--- a/llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
+++ b/llvm/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/llvm/lib/System/Mutex.cpp b/llvm/lib/System/Mutex.cpp
index 3bef7ce0b02..81dcd3b418b 100644
--- a/llvm/lib/System/Mutex.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud