From a72732cdf5523632664df286fe64eb1060971583 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Mon, 17 Mar 2014 19:34:51 +0000 Subject: [PATCH] Really REALLY finish adding const to the MachineRegisterInfo iterator range methods. llvm-svn: 204074 --- include/llvm/CodeGen/MachineRegisterInfo.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/include/llvm/CodeGen/MachineRegisterInfo.h b/include/llvm/CodeGen/MachineRegisterInfo.h index 62ec8b42044..228513076eb 100644 --- a/include/llvm/CodeGen/MachineRegisterInfo.h +++ b/include/llvm/CodeGen/MachineRegisterInfo.h @@ -238,7 +238,8 @@ public: } static reg_instr_iterator reg_instr_end() { return reg_instr_iterator(0); } - inline iterator_range reg_instructions(unsigned Reg) { + inline iterator_range + reg_instructions(unsigned Reg) const { return iterator_range(reg_instr_begin(Reg), reg_instr_end()); } @@ -252,7 +253,7 @@ public: } static reg_bundle_iterator reg_bundle_end() { return reg_bundle_iterator(0); } - inline iterator_range reg_bundles(unsigned Reg) { + inline iterator_range reg_bundles(unsigned Reg) const { return iterator_range(reg_bundle_begin(Reg), reg_bundle_end()); } @@ -270,7 +271,8 @@ public: } static reg_nodbg_iterator reg_nodbg_end() { return reg_nodbg_iterator(0); } - inline iterator_range reg_nodbg_operands(unsigned Reg) { + inline iterator_range + reg_nodbg_operands(unsigned Reg) const { return iterator_range(reg_nodbg_begin(Reg), reg_nodbg_end()); } @@ -287,8 +289,8 @@ public: return reg_instr_nodbg_iterator(0); } - inline iterator_range - reg_nodbg_instructions(unsigned Reg) { + inline iterator_range + reg_nodbg_instructions(unsigned Reg) const { return iterator_range(reg_instr_nodbg_begin(Reg), reg_instr_nodbg_end()); } @@ -306,7 +308,7 @@ public: } inline iterator_range - reg_nodbg_bundles(unsigned Reg) { + reg_nodbg_bundles(unsigned Reg) const { return iterator_range(reg_bundle_nodbg_begin(Reg), reg_bundle_nodbg_end()); }