diff --git a/llvm/include/llvm/IR/Instructions.h b/llvm/include/llvm/IR/Instructions.h index c07fee58e4bdb46..968737a843e2922 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(I) || isa(I)) && "Expected Load or Store instruction"); if (auto *LI = dyn_cast(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(I) || isa(I)) && "Expected Load or Store instruction"); if (auto *LI = dyn_cast(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(I) || isa(I)) && "Expected Load or Store instruction"); if (auto *LI = dyn_cast(I))