aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/APInt.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2020-07-13 17:15:25 +0200
committerPavel Labath <pavel@labath.sk>2020-07-13 17:32:54 +0200
commita2552f76ac6ff705434adb1d277a578445721b78 (patch)
tree63dbe9e1ea436ad34f38f33ede6d1ffbb4968a4f /llvm/lib/Support/APInt.cpp
parent4d3e8dc215d1ca99354f3c33cce87795d2b5098a (diff)
downloadllvm-a2552f76ac6ff705434adb1d277a578445721b78.zip
llvm-a2552f76ac6ff705434adb1d277a578445721b78.tar.gz
llvm-a2552f76ac6ff705434adb1d277a578445721b78.tar.bz2
[ADT] Make Load(AP)IntFromMemory pointer argument const
The function does not modify this memory.
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
-rw-r--r--llvm/lib/Support/APInt.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp
index 4a591ef..9a6f93f 100644
--- a/llvm/lib/Support/APInt.cpp
+++ b/llvm/lib/Support/APInt.cpp
@@ -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()));