Skip to content

Commit

Permalink
[NFC] Add const qualifier for parameters of functions in Instructions.h
Browse files Browse the repository at this point in the history
This is to extract the NFC change in llvm#96878 into a separate PR.
  • Loading branch information
KanRobert authored and kstoimenov committed Aug 15, 2024
1 parent 6566844 commit 019c1fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions llvm/include/llvm/IR/Instructions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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))
Expand All @@ -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))
Expand Down

0 comments on commit 019c1fa

Please sign in to comment.