mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
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
This commit is contained in:
parent
fe1215ef93
commit
c2680bef3b
@ -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.
|
/// 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) {
|
static void LoadIntFromMemory(APInt &IntVal, uint8_t *Src, unsigned LoadBytes) {
|
||||||
assert((IntVal.getBitWidth()+7)/8 >= LoadBytes && "Integer too small!");
|
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())
|
if (sys::isLittleEndianHost())
|
||||||
// Little-endian host - the destination must be ordered from LSB to MSB.
|
// Little-endian host - the destination must be ordered from LSB to MSB.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user