diff --git a/llvm/include/llvm/CodeGen/MachineFunction.h b/llvm/include/llvm/CodeGen/MachineFunction.h index 3b4de3fc302c..0ba5970ac5b8 100644 --- a/llvm/include/llvm/CodeGen/MachineFunction.h +++ b/llvm/include/llvm/CodeGen/MachineFunction.h @@ -184,7 +184,7 @@ public: /// isPhysRegUsed - Return true if the specified register is used in this /// function. This only works after register allocation. - bool isPhysRegUsed(unsigned Reg) { return UsedPhysRegs[Reg]; } + bool isPhysRegUsed(unsigned Reg) const { return UsedPhysRegs[Reg]; } /// changePhyRegUsed - This method allows code that runs after register /// allocation to keep the PhysRegsUsed array up-to-date.