Skip to content

Commit d1e5dc2

Browse files
committed
[NFC] Add const qualifier for parameters of functions in Instructions.h
This is to extract the NFC change in llvm#96878 into a separate PR.
1 parent 2fc71e4 commit d1e5dc2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/include/llvm/IR/Instructions.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4897,7 +4897,7 @@ inline Value *getPointerOperand(Value *V) {
48974897
}
48984898

48994899
/// A helper function that returns the alignment of load or store instruction.
4900-
inline Align getLoadStoreAlignment(Value *I) {
4900+
inline Align getLoadStoreAlignment(const Value *I) {
49014901
assert((isa<LoadInst>(I) || isa<StoreInst>(I)) &&
49024902
"Expected Load or Store instruction");
49034903
if (auto *LI = dyn_cast<LoadInst>(I))
@@ -4907,7 +4907,7 @@ inline Align getLoadStoreAlignment(Value *I) {
49074907

49084908
/// A helper function that returns the address space of the pointer operand of
49094909
/// load or store instruction.
4910-
inline unsigned getLoadStoreAddressSpace(Value *I) {
4910+
inline unsigned getLoadStoreAddressSpace(const Value *I) {
49114911
assert((isa<LoadInst>(I) || isa<StoreInst>(I)) &&
49124912
"Expected Load or Store instruction");
49134913
if (auto *LI = dyn_cast<LoadInst>(I))
@@ -4916,7 +4916,7 @@ inline unsigned getLoadStoreAddressSpace(Value *I) {
49164916
}
49174917

49184918
/// A helper function that returns the type of a load or store instruction.
4919-
inline Type *getLoadStoreType(Value *I) {
4919+
inline Type *getLoadStoreType(const Value *I) {
49204920
assert((isa<LoadInst>(I) || isa<StoreInst>(I)) &&
49214921
"Expected Load or Store instruction");
49224922
if (auto *LI = dyn_cast<LoadInst>(I))

0 commit comments

Comments
 (0)