summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
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
commit82b635781ab34c00eba5c4410d8912387147f03c (patch)
treeb29ff7e03f3d3882878ad0f4b7a8273cc27e56e1 /llvm/lib/ExecutionEngine/ExecutionEngine.cpp
parent8e46d89df452aac4a64ca562d3320b524b528d55 (diff)
downloadbcm5719-llvm-82b635781ab34c00eba5c4410d8912387147f03c.tar.gz
bcm5719-llvm-82b635781ab34c00eba5c4410d8912387147f03c.zip
Fix Casting
Do proper casting to eliminate a const-away-cast compiler warning. llvm-svn: 172470
Diffstat (limited to 'llvm/lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/ExecutionEngine.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
index ef5f5898968..6f71ffb2fa5 100644
--- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud