summaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2013-01-14 21:04:45 +0000
committerDavid Greene <greened@obbligato.org>2013-01-14 21:04:45 +0000
commitc2680bef3b4994017d83293bc1337b26be54ac77 (patch)
tree0f0663e1b1b0e898603dea5142926ab05b076737 /lib/ExecutionEngine
parentfe1215ef935f182cdca28b4af655fa0bfa0f47e6 (diff)
downloadexternal_llvm-c2680bef3b4994017d83293bc1337b26be54ac77.zip
external_llvm-c2680bef3b4994017d83293bc1337b26be54ac77.tar.gz
external_llvm-c2680bef3b4994017d83293bc1337b26be54ac77.tar.bz2
Fix Casting
Do proper casting to eliminate a const-away-cast compiler warning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172470 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r--lib/ExecutionEngine/ExecutionEngine.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp
index ef5f589..6f71ffb 100644
--- a/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -893,7 +893,8 @@ void ExecutionEngine::StoreValueToMemory(const GenericValue &Val,
/// from Src into IntVal, which is assumed to be wide enough and to hold zero.
static void LoadIntFromMemory(APInt &IntVal, uint8_t *Src, unsigned LoadBytes) {
assert((IntVal.getBitWidth()+7)/8 >= LoadBytes && "Integer too small!");
- uint8_t *Dst = (uint8_t *)IntVal.getRawData();
+ uint8_t *Dst = reinterpret_cast<uint8_t *>(
+ const_cast<uint64_t *>(IntVal.getRawData()));
if (sys::isLittleEndianHost())
// Little-endian host - the destination must be ordered from LSB to MSB.