[llvm-commits] [llvm] r166822 - /llvm/trunk/include/llvm/MC/MCRegisterInfo.h
Lang Hames
lhames at gmail.com
Fri Oct 26 15:14:10 PDT 2012
Author: lhames
Date: Fri Oct 26 17:14:10 2012
New Revision: 166822
URL: http://llvm.org/viewvc/llvm-project?rev=166822&view=rev
Log:
MCRegisterClass should be returned by const ref, not by value.
Modified:
llvm/trunk/include/llvm/MC/MCRegisterInfo.h
Modified: llvm/trunk/include/llvm/MC/MCRegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCRegisterInfo.h?rev=166822&r1=166821&r2=166822&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCRegisterInfo.h (original)
+++ llvm/trunk/include/llvm/MC/MCRegisterInfo.h Fri Oct 26 17:14:10 2012
@@ -370,7 +370,7 @@
/// getRegClass - Returns the register class associated with the enumeration
/// value. See class MCOperandInfo.
- const MCRegisterClass getRegClass(unsigned i) const {
+ const MCRegisterClass& getRegClass(unsigned i) const {
assert(i < getNumRegClasses() && "Register Class ID out of range");
return Classes[i];
}
More information about the llvm-commits
mailing list