AMDGPU: Make getNamedOperandIdx declaration readonly

This matches how it is defined in the generated implementation.

llvm-svn: 248598
This commit is contained in:
Matt Arsenault 2015-09-25 18:09:15 +00:00
parent a556fe8ec3
commit f743b838cb
2 changed files with 3 additions and 0 deletions

View File

@ -196,6 +196,7 @@ public:
};
namespace AMDGPU {
LLVM_READONLY
int16_t getNamedOperandIdx(uint16_t Opcode, uint16_t NamedIndex);
} // End namespace AMDGPU

View File

@ -338,8 +338,10 @@ public:
/// \brief Returns the operand named \p Op. If \p MI does not have an
/// operand named \c Op, this function returns nullptr.
LLVM_READONLY
MachineOperand *getNamedOperand(MachineInstr &MI, unsigned OperandName) const;
LLVM_READONLY
const MachineOperand *getNamedOperand(const MachineInstr &MI,
unsigned OpName) const {
return getNamedOperand(const_cast<MachineInstr &>(MI), OpName);