Skip to content

Commit

Permalink
[InstSimplify] Add missing const qualifier (NFC)
Browse files Browse the repository at this point in the history
The context instruction is a "const Instruction *", so that's
what getWithInstruction() should accept.
  • Loading branch information
nikic committed Oct 5, 2023
1 parent ba149f6 commit c263639
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/include/llvm/Analysis/InstructionSimplify.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ struct SimplifyQuery {
: DL(DL), DT(DT), AC(AC), CxtI(CXTI), IIQ(UseInstrInfo),
CanUseUndef(CanUseUndef) {}

SimplifyQuery getWithInstruction(Instruction *I) const {
SimplifyQuery getWithInstruction(const Instruction *I) const {
SimplifyQuery Copy(*this);
Copy.CxtI = I;
return Copy;
Expand Down

0 comments on commit c263639

Please sign in to comment.