mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[ADT] Make Load(AP)IntFromMemory pointer argument const
The function does not modify this memory.
This commit is contained in:
parent
7ff41afc34
commit
af4f8a5640
@ -2286,7 +2286,7 @@ void StoreIntToMemory(const APInt &IntVal, uint8_t *Dst, unsigned StoreBytes);
|
||||
|
||||
/// LoadIntFromMemory - Loads the integer stored in the LoadBytes bytes starting
|
||||
/// from Src into IntVal, which is assumed to be wide enough and to hold zero.
|
||||
void LoadIntFromMemory(APInt &IntVal, uint8_t *Src, unsigned LoadBytes);
|
||||
void LoadIntFromMemory(APInt &IntVal, const uint8_t *Src, unsigned LoadBytes);
|
||||
|
||||
} // namespace llvm
|
||||
|
||||
|
@ -3086,7 +3086,8 @@ void llvm::StoreIntToMemory(const APInt &IntVal, uint8_t *Dst,
|
||||
|
||||
/// LoadIntFromMemory - Loads the integer stored in the LoadBytes bytes starting
|
||||
/// from Src into IntVal, which is assumed to be wide enough and to hold zero.
|
||||
void llvm::LoadIntFromMemory(APInt &IntVal, uint8_t *Src, unsigned LoadBytes) {
|
||||
void llvm::LoadIntFromMemory(APInt &IntVal, const uint8_t *Src,
|
||||
unsigned LoadBytes) {
|
||||
assert((IntVal.getBitWidth()+7)/8 >= LoadBytes && "Integer too small!");
|
||||
uint8_t *Dst = reinterpret_cast<uint8_t *>(
|
||||
const_cast<uint64_t *>(IntVal.getRawData()));
|
||||
|
Loading…
Reference in New Issue
Block a user