From b95c6df392cabc310dc6ad38bac9a7e5e1351329 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Fri, 25 Sep 2015 18:09:15 +0000 Subject: [PATCH] AMDGPU: Make getNamedOperandIdx declaration readonly This matches how it is defined in the generated implementation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248598 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AMDGPU/AMDGPUInstrInfo.h | 1 + lib/Target/AMDGPU/SIInstrInfo.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lib/Target/AMDGPU/AMDGPUInstrInfo.h b/lib/Target/AMDGPU/AMDGPUInstrInfo.h index bbfa70ecffb..53e8b23b3d6 100644 --- a/lib/Target/AMDGPU/AMDGPUInstrInfo.h +++ b/lib/Target/AMDGPU/AMDGPUInstrInfo.h @@ -196,6 +196,7 @@ public: }; namespace AMDGPU { + LLVM_READONLY int16_t getNamedOperandIdx(uint16_t Opcode, uint16_t NamedIndex); } // End namespace AMDGPU diff --git a/lib/Target/AMDGPU/SIInstrInfo.h b/lib/Target/AMDGPU/SIInstrInfo.h index 272b65104a8..c12caa7a21a 100644 --- a/lib/Target/AMDGPU/SIInstrInfo.h +++ b/lib/Target/AMDGPU/SIInstrInfo.h @@ -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(MI), OpName); -- 2.34.1