aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShengchen Kan <shengchen.kan@intel.com>2024-08-03 17:02:16 +0800
committerShengchen Kan <shengchen.kan@intel.com>2024-08-03 17:04:27 +0800
commitd1e5dc254de7c543a971ebd58412e9a727f06536 (patch)
tree3499fc87a69f66d97f8fd0bf8bf4d4654d701d54
parent2fc71e4e4b0c2eabd7c863f5cdfa6245c1d87c71 (diff)
downloadllvm-d1e5dc254de7c543a971ebd58412e9a727f06536.zip
llvm-d1e5dc254de7c543a971ebd58412e9a727f06536.tar.gz
llvm-d1e5dc254de7c543a971ebd58412e9a727f06536.tar.bz2
[NFC] Add const qualifier for parameters of functions in Instructions.h
This is to extract the NFC change in #96878 into a separate PR.
-rw-r--r--llvm/include/llvm/IR/Instructions.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/include/llvm/IR/Instructions.h b/llvm/include/llvm/IR/Instructions.h
index c07fee5..968737a 100644
--- a/llvm/include/llvm/IR/Instructions.h
+++ b/llvm/include/llvm/IR/Instructions.h
@@ -4897,7 +4897,7 @@ inline Value *getPointerOperand(Value *V) {
}
/// A helper function that returns the alignment of load or store instruction.
-inline Align getLoadStoreAlignment(Value *I) {
+inline Align getLoadStoreAlignment(const Value *I) {
assert((isa<LoadInst>(I) || isa<StoreInst>(I)) &&
"Expected Load or Store instruction");
if (auto *LI = dyn_cast<LoadInst>(I))
@@ -4907,7 +4907,7 @@ inline Align getLoadStoreAlignment(Value *I) {
/// A helper function that returns the address space of the pointer operand of
/// load or store instruction.
-inline unsigned getLoadStoreAddressSpace(Value *I) {
+inline unsigned getLoadStoreAddressSpace(const Value *I) {
assert((isa<LoadInst>(I) || isa<StoreInst>(I)) &&
"Expected Load or Store instruction");
if (auto *LI = dyn_cast<LoadInst>(I))
@@ -4916,7 +4916,7 @@ inline unsigned getLoadStoreAddressSpace(Value *I) {
}
/// A helper function that returns the type of a load or store instruction.
-inline Type *getLoadStoreType(Value *I) {
+inline Type *getLoadStoreType(const Value *I) {
assert((isa<LoadInst>(I) || isa<StoreInst>(I)) &&
"Expected Load or Store instruction");
if (auto *LI = dyn_cast<LoadInst>(I))