[llvm] r360849 - Fix missing const
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed May 15 21:08:25 PDT 2019
Author: arsenm
Date: Wed May 15 21:08:25 2019
New Revision: 360849
URL: http://llvm.org/viewvc/llvm-project?rev=360849&view=rev
Log:
Fix missing const
Modified:
llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h
Modified: llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h?rev=360849&r1=360848&r2=360849&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h Wed May 15 21:08:25 2019
@@ -82,7 +82,7 @@ public:
/// Get the register for the operand index.
/// The operand at the index should be a register (asserted by
/// MachineOperand).
- unsigned getReg(unsigned Idx) { return MI->getOperand(Idx).getReg(); }
+ unsigned getReg(unsigned Idx) const { return MI->getOperand(Idx).getReg(); }
/// Add a new virtual register operand.
const MachineInstrBuilder &addReg(unsigned RegNo, unsigned flags = 0,
More information about the llvm-commits
mailing list